TITLE: $n^5-n$ is divisible by $10$?
QUESTION [16 upvotes]: I was trying to prove this, and I realized that this is essentially a statement that $n^5$ has the same last digit as $n$, and to prove this it is sufficient to calculate $n^5$ for $0-9$ and see that the respective last digits match. Another approach I tried is this: I factored $n^5-n$ to $n(n^2+1)(n+1)(n-1)$. If $n$ is even, a factor of $2$ is guaranteed by the factor $n$. If $n$ is odd, the factor of $2$ is guaranteed by $(n^2+1)$. The factor of $5$ is guaranteed if the last digit of $n$ is $1, 4, 5, 6,$ $or$ $9$ by the factors $n(n+1)(n-1)$, so I only have to check for $n$ ending in digits $0, 2, 3, 7,$ $and$ $8$.  However, I'm sure that there has to be a much better proof (and without modular arithmetic). Do you guys know one? Thanks!

REPLY [3 votes]: Key idea $\ \ p\!-\!1\mid n\!-\!1\,\Rightarrow\, p\mid a^n- a.\ $ Proof $\ $ Clear if $\,p\mid a.\,$  Else write $\, \color{#f0f}n = (p\!-\!1)k + 1.\,$
$\  \color{#0a0}{b\!-\!1\mid b^k\!-\!1}\,$ so $\,b = a^{p-1}\,\Rightarrow\, \color{#c00}{p\mid} \color{#0a0}{a^{p-1}\!-\!1\mid (a^{(p-1)k}\!-\!1)}a = a^\color{#f0f}{\large n}\!-\!a\ $ by $\rm\color{#c00}{little\ Fermat}\ \ {\bf QED}$
So $\ p\!-\!1,q\!-\!1\mid n\!-\!1\,\Rightarrow\ p,q\mid a^n\!-a\,\Rightarrow\,pq\mid a^n\!-a,\,$ by $\,{\rm lcm}(p,q) = pq\,$ for $\,p\neq q\,$ primes. Yours is the special case $\ p = 2,\ q = 5,\ n = 5.$ 
The converse is also true, which yields the following generalization of little Fermat-Euler.
Theorem $\ \ $ For naturals $\ m,n > 1$
$$ m \mid a^n - a\ \ \ \text{for all }\ a\in\Bbb Z\iff m\ \text{ is squarefree, and prime } p\mid m\,\Rightarrow\, p-1\mid n- 1$$