Groups that are not direct products of other groups? Is there any criterion for determining whether a group can be written as a direct product of two other (non trivial) groups or not? For example, finite cyclic groups of prime power order are not isomorphic to any direct product (at least, not one of abelian groups). If there is no criterion, are there specific classes of groups known to have this property?

Yes. There is a general theorem:
Let $G,G_{1},...,G_{n}$ groups. Then $G$ is isomorphic to direct product $G_{1}\times\cdots\times G_{n}$ if and only if $G$ has subgroups $H_{1}\simeq G_{1}$,..., $H_{n}\simeq G_{n}$ such that:


*

*$G=H_{1}...H_{n}$.

*$H\lhd G$, for all $i=1,,,n$.

*$H_{i}\cap(H_{1}...H_{i-1}H_{i+1}...H_{n})=\{e\}$, for all $i=1,...,n$, where $e$ is the neutral element of $G$.
