Prove if $p\nmid a$ then $a^{p^2}\equiv a^p\bmod p^2$.
I tried to use Fermat's little theorem and I got $a^{p^2}\equiv a\bmod p^2$ but I don't know how to prove the main result.
Prove if $p\nmid a$ then $a^{p^2}\equiv a^p\bmod p^2$.
I tried to use Fermat's little theorem and I got $a^{p^2}\equiv a\bmod p^2$ but I don't know how to prove the main result.
Euler's theorem, a generalisation of Fermat's little theorem, gives us that $$a^{\varphi(p^2)}\equiv1\bmod p^2$$ But $\varphi(p^2)=p(p-1)$, so $$a^{p(p-1)}\equiv1\bmod p^2$$ Multiply by $a^p$ to establish the desired result: $$a^{p^2}\equiv a^p\bmod p^2$$