Fermat's Little Theorem/Corollary 2

Corollary to Fermat's Little Theorem
If $p$ is a prime number, then:
 * $n^{p-1} \equiv \left[{p \nmid n}\right] \pmod p$

where $\left[{\cdots}\right]$ is Iverson's convention.

Proof
If $p \nmid n$ then from Fermat's Little Theorem:
 * $n^{p-1} \equiv 1 \pmod p$

If $p \mathop \backslash n$ then $p \mathop \backslash n^{p-1}$ and $n^{p-1} \equiv 0 \pmod p$ by definition.

Hence the result by definition of Iverson's convention.