Prove that $390\mid n^{13}-n$ for all $n\in\mathbb Z$
Attempt:
$$390=2\times3\times5\times13$$
Fermat theorem: $a^p\equiv a\pmod p$, here:
$$n^{13}\equiv n \pmod{13}$$
So $\color{red}{13}\mid n^{13}-n$ but what can I say about $\color{red}{390}$?
Prove that $390\mid n^{13}-n$ for all $n\in\mathbb Z$
Attempt:
$$390=2\times3\times5\times13$$
Fermat theorem: $a^p\equiv a\pmod p$, here:
$$n^{13}\equiv n \pmod{13}$$
So $\color{red}{13}\mid n^{13}-n$ but what can I say about $\color{red}{390}$?
By Fermat's theorem, $n^{p-1} \equiv 1 \mod p$ when $p$ is a prime and $n$ is prime to $p$. Assume that none of $2,3,5,13$ divide $n$. Then $n \equiv 1\mod 2$ and hence $n^{12} \equiv 1 \mod 2 $, $n^2 \equiv 1 \mod 3$ and hence $n^{12} \equiv 1 \mod 3$, $n^4 \equiv 1 \mod 5$ and consequently, $n^{12} \equiv 1 \mod 5$. Finally, $n^{12} \equiv 1 \mod 13$. Thus in this case, $n^{12} \equiv 1 \mod 390$ and hence $n^{13} \equiv n \mod 390$. If any of the primes $2,3,5,13$ divide $n$, then $n^{13} - n = n(n^{12}-1)$ is also divisible by that prime. This completes the proof.