Let $p$ be a prime, let $n$ and $k$ be positive integers
and let $G$ be a group of order $p^n$.
Further, let $a\_{p^k}$ denote the number of subgroups of $G$ of index $p^k$.


If $a\_{p^k}$ is greater than 1 and not congruent to $p+1$ modulo $p^2$ --
does it follow that $p = 2$ and $G$ is either a dihedral group,
a quasidihedral group or a generalized quaternion group?



Number of subgroups of a $p$-group of index $p^k$
It seems that the $p>2$ part of this was proved in


*Kulakoff, A.*, [**Über die Anzahl der eigentlichen Untergruppen und der Elemente von gegebener Ordnung in $p$-Gruppen.**](http://dx.doi.org/10.1007/BF01457969), Math. Ann. 104, 778-793 (1931). [ZBL57.0146.03](https://zbmath.org/?q=an:57.0146.03).


and the $p=2$ part in


*Easterfield, T. E.*, An extension of a theorem of Kulakoff, Proc. Camb. Philos. Soc. 34, 316-320 (1938). [ZBL0019.10802](https://zbmath.org/?q=an:0019.10802).


