  A finite $p$-group $G$ is said to be $d$-maximal if $d(H)<d(G)$ for every
subgroup $H<G$, where $d(G)$ denotes the minimal number of generators of $G$. A
similar definition can be formulated when $G$ is acted on by some group $A$. We
generalize results of B. Kahn and T. Laffey to the latter case, and give them
in particular alternative short proofs. We answer moreover a question of Y.
Berkovich about the minimal non-metacyclic $p$-groups.
