Showing that $1+a+a^2+\cdots+a^{\phi(m)-1}\equiv0\bmod{m}$ if $\gcd(a,m)=\gcd(a-1,m)=1$

79 Views Asked by At

Show that for $a \in \mathbb{Z}, m\in \mathbb{N}$: $$1+a+a^2+...+a^{\phi(m)-1} \equiv 0 \mod{m}$$ if $\gcd(a,m)=\gcd(a-1,m)=1$.

The relation is trivially true for $m=1$. For $m \geq 2$ we know from the gcd relations that $a^{\phi(m)} \equiv1 \mod{m}$, hence $m |a^{\phi(m)}-1$ and also $m|(a-1)^{\phi(m)}-1$.

We need to show that $m|\sum_{k=0}^{\phi(m)-1}a^k$. I tried rewriting $a^{\phi(m)}-1$ using the binomial theorem but so far I couldn't complete the proof. Thanks for your answers!