fermat's theorem

Fermat's theorem states that for any prime number p, and any integer a relatively prime to p, the equation a^(p-1) is congruent to 1 (mod p) holds true.

Requires login.