I am seeking to generalize this result (which is a particular case: $n=3$).
Let $G$ be a finite group and $n\in\mathbb Z^+$. Find the values of $n$ for which the following implication holds. $$ x\mapsto x^n \text{ is an automorphism on $G$} \implies G \text{ is abelian}.$$
I believe that it's true for all $n\neq 1$.
Observations:
- $(xy)^n=x^n y^n\implies (yx)^{n-1}=x^{n-1}y^{n-1}$.
- If $x\mapsto x^n$ is an automorphism then $x^{n-1}\in Z(G)$ for all $x\in G$. (Proof).
For $n=2$: observation $1$ suffices.
For $n=3$: We have $(yx)^2 = x^2y^2$ (from obs. 1). And by obs. 2, $x^2y^2= y^2x^2$. Thus, $(yx)^2 = y^2x^2$. (We're done using $n=2$ case.)
For $n=4$: $(yx)^3 \overset{\text{obs. }1}= x^3y^3 \overset{\text{obs. }2}= y^3x^3$.
This gives an idea for an inductive proof.
Am I right? I'm posting this because I have seen homework problems with $n=2$ and $n=3$ on this site but no generalization. So I'm suspicious that there may be something wrong in my proof.
Update: I spotted the mistake. In the $n=4$ case, I have proved that if $x\mapsto x^4$ is an automorphism then it holds that $(xy)^3=x^3y^3$. This result is correct. However, this result alone doesn't imply that $G$ is abelian. We also need that $x^3=e\iff x=e$. Thus, $n=3$ case doesn't contribute anything to $n=4$ case.