Let $p$ be a prime and let $f(p)$ be the number of groups of order $31p^2$ up to isomorphism.
I have a homework problem which involves finding which choices for $p$ make $f(p)$ as large as possible. In order to solve the problem, I suspect that I will essentially need to classify groups of order $31p^2$. There will, of course be two cases to consider: either $p=31$ or $p \neq 31$.
If $p=31$, then we are looking for the number of groups of order $p^3$, hence $f(p)=5$ by this.
Now assume $p\neq31$. Then for a group $|G|=31p^2$ we have $n_p \equiv 1$ (mod $p$) and $n_p|31$, implying $n_p \in \{1,31\}$. So it seems there are two cases to consider.
If $n_p=31$, we have $31 \equiv 1$ (mod $p$) and hence $p|30$, so $p \in \{2,3,5\}$. Using OEIS, we see that (up to isomorphism) there are $4$ groups of order $31*2^2$, $4$ groups of order $31*3^2$, and $4$ groups of order $31*5^2$. Hence, since we are trying to maximize $f(p)$, we can assume WLOG $p \notin \{2,3,5\}$, which forces $n_p=1$.
If $n_p=1$, $G$ has a normal Sylow-p subgroup. But does this help at all?
I know the Fundamental Theorem of (finitely generated) Abelian Groups. So if it turns out that all the groups of order $31p^2$ are abelian (for a given $p$), then finding $f(p)$ will be stupidly easy.
This homework, by the way, coincides with our study for semidirect products, hence I wouldn't be surprised if semidirect products play a vital role in the solution.