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 $\displaystyle |G: Frat(G)| = p^r$ then every basis contains precisely $\displaystyle r$ 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 $\displaystyle x\in S$ with $\displaystyle <S>=G$ then $\displaystyle <S\setminus x> = G$). The theorem also tells us that $\displaystyle Frat(G) = G^{\prime}G^p$).

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 $\displaystyle x\in B$. However, the p-th roots of $\displaystyle x$ must be contained in the group, and cannot be generated by $\displaystyle x$, and so they are contained in $\displaystyle <B\setminus x>$. However, as the p-th roots of $\displaystyle x$ are in $\displaystyle <B\setminus x>$ then so is $\displaystyle x$ and so $\displaystyle B\setminus x$ generates $\displaystyle G$, a contradiction).