Problem
NT-B1-M07-P017 Fermat Form \(a^p-a\)
#17
★★★☆☆ Level 3 of 5
Prove that for every prime \(p\) and every integer \(a\), the number \(a^p-a\) is divisible by \(p\).
Split into the cases \(p\mid a\) and \(p\nmid a\).
If \(p\mid a\), then \(a^p-a\equiv0-0\equiv0\pmod p\). If \(p\nmid a\), Fermat gives \(a^{p-1}\equiv1\pmod p\). Multiplying by \(a\), \(a^p\equiv a\pmod p\). In both cases, \(p\mid a^p-a\).
This is the universal form of Fermat's little theorem.