Let n E Z. and supposed that 5 does not divide n. Prove that n^4 is congruent to 1 mod 5.
Nothing fancy here. For example,
$\displaystyle n \equiv 1~\text{ (mod 5)}$
so
$\displaystyle n^4 \equiv (1)^4 \equiv 1~\text{ (mod 5)}$
Similarly for $\displaystyle n \equiv 2~\text{ (mod 5)}$
$\displaystyle n^4 \equiv (2)^4 \equiv 16 \equiv 1~\text{ (mod 5)}$
etc.
-Dan
If n is not divisible by 5, then one of $\displaystyle n+1$, $\displaystyle n-1$, $\displaystyle n+2$, $\displaystyle n-2$ must be divisible by 5.
Hence the product $\displaystyle (n+1)(n-1)(n+2)(n-2)=(n^2-1)(n^2-4)$ must be divisible by 5.
Note however that $\displaystyle n^2-4\equiv n^2+1\pmod{5}$.
Hence $\displaystyle (n^2-1)(n^2+1)=n^4-1$ is divisible by 5; in other words $\displaystyle n^4\equiv1\pmod{5}$.
In general, Fermat's little theorem states that if p is prime and p does not divide n, then $\displaystyle n^{p-1}\equiv1\pmod{p}$.