# When is a power map a homomorphism?

Let $G$ be a finite group and define the power map $p_m:G\to G$ for any $m\in\mathbb Z$ by $p_m(x)=x^m$. When is this map a group homomorphism?

The $p_m$ is clearly a homomorphism whenever $G$ is abelian. Also, if $N$ is the least common multiple of orders of elements of $G$, then $p_{m+N}=p_m$ for all $m$ so the answer only depends on $m$ modulo $N$. (Note that $N$ divides $|G|$ but need not be equal to it.) Also, $p_0$ and $p_1$ are always homomorphisms and $p_{-1}$ is so if and only if $G$ is abelian.

There are also less trivial examples. If $G=C_4\times S_3$ (where $C_n$ denotes the cyclic group of order $n$), then $p_6$ is a nontrivial homomorphism (neither constant nor identity). Its image is $C_2\times0<C_4\times S_3$. More generally, if $G_1$ is any nonabelian group and $n$ coprime to $m=|G_1|$, then $p_m$ is a nontrivial homomorphism for $G=C_n\times G_1$.

A more refined version of the question: Can we somehow describe or classify those groups $G$ and numbers $m$ for which $p_m$ is a homomorphism? For example, is the image $p_m(G)$ necessarily an abelian subgroup like in all of my examples? If a group admits a nontrivial $m$ (that is, $m\not\equiv0,1\pmod N$) for which $p_m$ is a homomorphism, is the group necessarily a product of an abelian group and another group?

If $p_m$ is an homomorphism then it is easy to see that $p_m(G)$ is an charactersitic subgroup of $G$ for $\sigma\in Aut(G)$, $\sigma(x^n)=\sigma(x)^n$.
Let $K=p_m(G)$ and assume that $(m,\dfrac{|G|}{m})=1$ then $|K|,(\dfrac{|G|}{|K|})=1$. By Schur-zasenaus theorem $G=HK$ for a complement $H$ of $K$.
By transfer theory, if $|G:Z(G)|=n$ then $p_n:G\to G$ by $x\mapsto x^n$ is an homomorphim which has nontrivial proof.