How to prove that $m \mid \phi (a^m - 1)$ if $gcd(a,m) = 1$
$\phi$ is euler function
How to prove that $m \mid \phi (a^m - 1)$ if $gcd(a,m) = 1$
$\phi$ is euler function
Euler's theorem says that $$b^{\phi(a^m-1)}\equiv 1\pmod{a^m-1}$$ when $\gcd(b,a^m-1)=1$.
Since $\gcd(a,a^m-1)=1$, $$a^{\phi(a^m-1)}\equiv 1\pmod{a^m-1}$$
We have also that $$a^m\equiv 1\pmod{a^m-1}$$
Note that $m$ is the order of $a$ in the multiplicative group $\Bbb Z_{a^m-1}^\times$, because $1
Then $m\mid\phi(a^m-1)$. I have not used that $a$ and $m$ are coprime. Are you sure that this is necessary?