For Fermat's little theorem, first suppose . Multiplication by permutes the nonzero residue classes modulo : if , the prime cannot divide , so cancellation gives . Multiplying the representatives in this permutation,Every factor of the factorial is nonzero modulo the prime, so the factorial has a modular inverse and can be cancelled. Thus and . If , both sides are zero modulo . Hence for every integer ,For completeness, the cancellation used above follows from Bézout's identity: a number relatively prime to has an inverse modulo .
Articles by others on the same topic
There are currently no matching articles.