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?
Elaborately: 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?

Observations

*

*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.
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: A partial answer;
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$.
Beside that,
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.
A: This is an old question, but the answer is actually in a different question which was closed as a duplicate to this one, and this one only has a partial answer. So I am transcribing part of my answer there here.
A group for which the power map $f(x) = x^n$ is a homomorphism is called an “$n$-abelian group.” Such a group satisfies the identity $(xy)^n = x^ny^n$ for all $x,y$.
The structure of $n$-abelian groups was determined by Alperin:
Theorem. (Alperin) A group $G$ is $n$-abelian if and only if there exist groups $A$, $M$, and $N$, and $S$ such that:

*

*$A$ is abelian;

*$M$ is of exponent $n$;

*$N$ is of exponent $n-1$;

*$S$ is a subgroup of $A\times M\times N$; and

*$G$ is isomorphic to a quotient of $S$.

There is more that can be said. For a given group $G$ we can ask for the values of $m$ for which the map is a homomorphism. This leads to the notion of Levi systems. You can find a discussion of some of those ideas in this math.overflow question, which asks for which pairs of integers $m$ and $n$ will a group that is both $m$-abelian and $n$-abelian necessarily be abelian.
References.

*

*Alperin, J.L. A classification of $n$-abelian groups. Canadian J. Mathematics, 21 (1969), pp. 1238-1244.

