Fermat's Little Theorem/Corollary 2

Corollary to Fermat's Little Theorem
Let $p$ be a prime number.

Then:
 * $n^{p-1} \equiv \left[{p \nmid n}\right] \pmod p$

where:
 * $\nmid$ denotes non-divisibility
 * $\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 \mathrel \backslash n$ then:
 * $p \mathrel \backslash n^{p-1}$

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

Hence the result by definition of Iverson's convention.