I'm working through Niven's book on Number Theory and I'm having trouble with this question:
Prove that, for any integer $a$, $a^m \equiv a^{m-\phi(m)}$ (mod $m$). I can easily figure it out in the case where $(a,m) = 1$, but I'm having trouble in the case that they're not relatively prime.
Thank you!