What do you mean by `there are no gaps'?

Also - and I don't know why I didn't think of this before - the Burnside Basis Theorem solves this problem for p-groups. If

then every basis contains precisely

elements. See p140 of Robinson's`A Course in the Theory of Groups'. (Frat(G) is the Frattini subgroup of G, and is defined to be the intersection of all the maximal subgroups of G, or equivalently the set of non-generators for G (x is a non-generator if

with

then

). The theorem also tells us that

).

Also, another interesting fact is that some groups do not contain any basis. For example, the

prufer quasicyclic p-group does not contain a basis (assume it does, then there exists some generating set, B, such than removing an element no longer generated your group. Let

. However, the p-th roots of

must be contained in the group, and cannot be generated by

, and so they are contained in

. However, as the p-th roots of

are in

then so is

and so

generates

, a contradiction).