TITLE: order of a class-preserving automorphism of $G$ have all its prime factor divides $|G|$
QUESTION [6 upvotes]: Let $\alpha$ be an automorphism of finite group $G$, if $\alpha$ maps any element $g$ to its conjugate $x_ggx_g^{-1}$ ($x_g$ could depend on g, so $\alpha$ is not necessarily inner), then the order of $\alpha$ has its prime factors all divide $|G|$.
These automorphisms are called class-preserving automorphisms denoted $\mathrm{Aut}_c(G)$. source [1] says
"One of the basic facts about class-preserving automorphisms is that primes
dividing the order of $\mathrm{Aut}_c(G)$ also divide the order of $G$", which easily leads to the above result, however I can't find its proof anywhere.
[1] Class-Preserving Automorphisms of Finite Groups,
Martin Hertweck, doi:10.1006/jabr.2001.8760

REPLY [4 votes]: Let $\alpha$ be a class-preserving automorphism of $G$. WLOG we can assume that $\alpha$ has order $p$, a prime number. So assume $p$ does not divide $|G|$. Since $\alpha$ acts on a conjugacy class, the orbits are of length $p$ or $1$, but they cannot be all $p$ since then $p$ would divide the cardinality of the class and hence (this cardinality is an index of $G$) $p$ would divide $|G|$. So for each class $K_i$ we have a fixed-point $x_i$ $(i=1, \cdots , k$, where $k=k(G)$ the number of conjugacy classes of $G$.) Put $H=\langle x_1, x_2 , \cdots , x_k \rangle$. Then $\bigcup_{g \in G}H^g=G$. But this can only happen (this is a classical argument, see for example here) when $G=H$, implying $\alpha$ acts trivially on $G$, that is $o(\alpha)=p=1$, a contradiction.