Trouble Understanding Fermat's Little Theorem for Non-Coprime Case

434 Views Asked by At

For the case where some integer, $n$ is coprime to a prime modulus, $p$, I have proven and understood Fermat's Little Theorem as it is nothing more than Euler's Theorem applied to a prime modulus.

For the case where some integer $n$ is not coprime to $p$ $$ \gcd(n,p) \neq 1 \implies p | n $$ This would mean that $$ n \equiv 0\mod p.$$ So far so good. But how does one then go from here to $$0 \equiv n^p \equiv n \mod p$$ as is done by Herstein on page 44 of topics in algebra.

Any help or way-pointing is more than appreciated.

2

There are 2 best solutions below

5
On BEST ANSWER

If $$\begin{align}{a\equiv b\mod p,\\c\equiv d\mod p,}\end{align}$$

then $$ac\equiv bd\mod p,$$

since $n\equiv n\mod p$ so in your case $$n*n*n*\dots\equiv0*n*n*\dots\mod p,$$

given $n\equiv0\mod p$, so $$n^p\equiv0\equiv n\mod p.$$

7
On

Both sides are then divisible by $p$, so their difference is too.