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}.
