Which integers $n>2$ have the following property?

There is a group $G$ such that

- $G^n \cong G$; and
- for all integers $k$ with $1<k<n$ we have $G^k\not \cong G$.

$\begingroup$
$\endgroup$

Which integers $n>2$ have the following property?

There is a group $G$ such that

- $G^n \cong G$; and
- for all integers $k$ with $1<k<n$ we have $G^k\not \cong G$.

$\begingroup$
$\endgroup$

This is possible with abelian groups for any $n$; see this answer to a very similar question.