Fermat's little theorem - GeeksforGeeks
www.geeksforgeeks.org › fermats-little-theoremApr 20, 2021 · Fermat’s little theorem. Fermat’s little theorem states that if p is a prime number, then for any integer a, the number a p – a is an integer multiple of p. ap ≡ a (mod p). Special Case: If a is not divisible by p, Fermat’s little theorem is equivalent to the statement that a p-1 -1 is an integer multiple of p. Here a is not divisible ...
Introduction - Keith Conrad's Home Page
kconrad.math.uconn.edu › fermatlittletheorema 6 0 mod p. To emphasize that, let’s rewrite Fermat’s little theorem like this: If p is a prime number then ap 1 1 mod p for all integers a 6 0 mod p. The expression ap 1 in the congruence still makes sense if we replace the prime p with an arbitrary integer m 2, so the contrapositive of Fermat’s little theorem says: If m 2 and am 1 6 1 ...