Relationship between residues modulo $p^n$ and $p$

abstract-algebragroup-theorymodular arithmetic

Let $p$ be a prime number and $a,n \in \mathbb{N}$ such that $\gcd(a,p)=1$. Show that
$$ a^{p^{n-1}} \equiv 1(\textrm{mod}\ p^{n}) \iff a \equiv 1 (\textrm{mod}\ p) $$
I think Euler's theorem could help here because we have that if $\gcd(a,p^{n})=1$ then
$$ a^{\phi(p^{n})} \equiv 1 (\textrm{mod}\ p^{n} )$$
where $ \phi(p^n)=p^{n-1}(p-1)$. So we would have to prove something like
$$ a^{\frac{\phi(p^n)}{p-1}} \equiv 1(\textrm{mod}\ p^n) \iff a \equiv 1 (\textrm{mod}\ p) $$
But I don't know how to continue, this is an exercise from a group theory book so maybe Lagrange's Theorem has something to do here

Best Answer

$a^{p^{n-1}} \equiv 1 \bmod p^{n} \implies a \equiv 1 \bmod p$

By induction. If $n=1$, then it is true. If $n\ge2$, then

$a^{p^{n-1}} \equiv 1 \bmod p^{n} \implies (a^p)^{p^{n-2}} \equiv 1 \bmod p^{n} \implies (a^p)^{p^{n-2}} \equiv 1 \bmod p^{n-1} \implies a^p \equiv 1 \bmod p$

By Fermat, $a^p \equiv a \bmod p$ and so $a \equiv 1 \bmod p$.

$a \equiv 1 \bmod p \implies a^{p^{n-1}} \equiv 1 \bmod p^{n}$

By induction. If $n=1$, then it is true. If $n\ge2$, then

$a^{p^{n-1}} = (a^{p^{n-2}})^p = (1+b p^{n-1})^p \equiv 1 \bmod p^{n}$

by the binomial theorem.