Little Fermat equivalence $\!\bmod p\!:\, a^p\equiv a\!\iff \!a^{p-1}\equiv 1\,$ for $\,a\not\equiv 0$ In various texts, I have seen Fermat's Little Theorem presented as: $\forall a\in\mathbb Z, a\not\equiv 0\pmod{p}$ and prime $p$, $a^{p-1}\equiv1\pmod{p}$. On the other hand, in a reputable text, I recently encountered FLT as: $p\mid n^p-n,\forall n\in\mathbb Z$  I don't see why these are the same, it seems that the first definition is stronger. From the first definition, we can derive the second as follows, $n^{p-1} = 1+kp$ for some $k$, so $n^p - n = knp$ and so the RHS is clearly $0\pmod{p}$. On the other hand, I don't see how the other direction follows, if $n^p-n = kp$ for some $k$, then $n^{p-1} = 1+\frac{k}{n}p$, and it is not obvious to me why $k/n$ must be an integer. Can someone please explain?
The $2$ are actually basically equivalent. For $a \not\equiv 0 \pmod p$, then

$$a^{p-1} \equiv 1 \pmod p \implies a^{p} \equiv a \pmod p \implies p \mid a^p - a \tag{1}\label{eq1A}$$

If $a \equiv 0 \pmod p$, then $a^p \equiv a \pmod p \implies p \mid a^p - a$ as well.

On the other hand, from $p \mid n^p - n$, if $\gcd(n,p) = 0$, then $n$ has a multiplicative inverse modulo $p$, so

$$n^p \equiv n \pmod p \implies n^{p-1} \equiv 1 \pmod p \tag{2}\label{eq2A}$$

which is the same as \eqref{eq1A} where $n = a$.

Of course, if $p \mid n$, then $n^{p-1} \equiv 0 \not\equiv 1 \pmod p$, which is why $a \not\equiv 0 \pmod p$ is required for \eqref{eq1A}.
The thing is.  If $a\equiv 0\pmod p$ then $a \equiv 0 \equiv 0^k \equiv 0^p \equiv a^p \pmod m$.  Always.  That's trivial and always true and does really need to be stated.

So if $a^{p-1}\equiv 1\pmod p$ whenever $a\not \equiv 0\pmod  p$ then the following is true:  if $a\not \equiv 0\pmod p$ then $a^{p-1}\equiv 1\pmod p$ so $a^p=a^{p-1}a \equiv 1*a \equiv a \pmod p$.  And if $a\equiv 0 \pmod p$ then $a^p \equiv 0^p \equiv 0 \equiv a\pmod p$.  So $a^p \equiv a \pmod p$ no matter what.  So


  $a^{p-1}\equiv 1 \pmod p$ whenever $a\not \equiv 0\pmod  p\implies a^p \equiv a\pmod p$ always.


And if if $a^p \equiv a \pmod p$ for all $a$ then if $a\not \equiv 0\pmod  p$ we have $a^p \equiv a\pmod p$.  As $p$ is prime, there is a $a^{-1}$ so that $a*a^{-1}\equiv 1 \pmod p$.  So $a^p*a^{-1} \equiv a*a^{-1} \pmod p$ so $a^{p-1}\equiv a\pmod p$.

So 


  $a^p\equiv a \pmod p$ for all $a \implies a^{p-1}\equiv 1 \pmod p$ for all $a\not \equiv 0\pmod p$.