# For which numbers $n$ is every group of order $n$ nilpotent?

I would like to have a simple criterion for the numbers $n$ with the property that every group of order $n$ is nilpotent.

If $n$ is a prime power, it is clear that $n$ has this property.

If $n$ is an abelian number (every group of order $n$ is abelian) , then the property is satisfied as well.

So, let's omit those cases.

Which numbers $n$ satisfy the following conditions ?

• $n$ is not a prime power.
• There is at least one non-abelian group of order $n$.
• Every group of order $n$ is nilpotent.

The smallest such numbers are $135$, $297$ and $459$, all having the form $3^3p$ , $p$ prime , $p>3$.

The desired sequence does not contain even numbers because the dihedral group $D_{2n}$ is not nilpotent for $n\ge 3$ , unless $2$ is a power of $2$. (Is there an easy proof for that ?)

• Take a look at Pete L. Clark's answer to an older question. I think it has some information relevant to your question. A nilpotent group is always the direct product of its Sylow subgroups, so to get non-abelian examples you need $n$ to be divisible by at least one cube. Mar 9, 2016 at 17:24
• This is really helpful and coincides with my conjecture that it has something to do with the congruences of the prime powers modulo another prime. Mar 9, 2016 at 17:27

Here is the characterization. Write the prime factorization of $n$ as $n = p_1^{k_1} \cdots p_t^{k_t}$.
Then every group of order $n$ is nilpotent if and only if $p_i^s \not\equiv 1 \mod{p_j}$ for all $i \neq j$ and $1 \leq s \leq k_i$.
If $p_i^s \equiv 1 \mod{p_j}$ for $1 \leq s \leq k_i$, then $p_j$ divides the order of $\operatorname{Aut}((\mathbb{Z}/p_i\mathbb{Z})^s) \cong \operatorname{GL}_s(\mathbb{Z}/p_i\mathbb{Z})$. Thus we can form a nontrivial semidirect product $H = (\mathbb{Z}/p_i\mathbb{Z})^s \rtimes \mathbb{Z}/p_j\mathbb{Z}$. Because $H$ is non-abelian and its Sylow subgroups are abelian, it follows that $H$ is not nilpotent. Then $$H \times (\mathbb{Z}/p_i\mathbb{Z})^{k_i - s} \times (\mathbb{Z}/p_j\mathbb{Z})^{k_j - 1} \times \mathbb{Z} / m \mathbb{Z}$$ for $m = n/{p_i^{k_i} p_j^{k_j}}$ is a non-nilpotent group of order $n$.