Fermat's little theorem

From Number
Revision as of 22:25, 19 April 2009 by Vipul (talk | contribs) (Created page with '==Statement== ===For a relatively prime number=== Suppose <math>p</math> is a prime number and <math>a</math> is a natural number that is not a multiple of <math>p</math>. Then...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Statement

For a relatively prime number

Suppose p is a prime number and a is a natural number that is not a multiple of p. Then, the following equivalent statements hold:

  1. (Divisibility form): p divides ap11.
  2. (Congruence form): ap11(modp).
  3. (Order of element modulo another): The order of a modulo p divides p1.

For a not necessarily relatively prime number

Suppose p is a prime number and a is a natural number, not necessarily relatively prime to p. Then, the following equivalent statements hold:

  1. (Divisibility form): p divides apa.
  2. (Congruence form): apa(modp).

Related facts

Stronger facts

Other related facts

  • Wilson's theorem: This states that for any prime p, (p1)!1(modp).
  • For a given a modulo p that is relatively prime to p, a(p1)/2 is 1 modulo p if and only if a is a quadratic residue modulo p.
  • Period in decimal expansion of reciprocal of prime divides prime minus one: Suppose b>1 is chosen as a base for writing numbers, and p is a prime that does not divide b. Then, the expansion of 1/p in base b has period dividing p1. In fact, the period equals the order of b modulo p, and it divides p1 by Fermat's little theorem. It equals p1 if and only if b is a primitive root modulo p. For b=10, such primes p are termed full reptend primes.

Converse

If, for a given a relatively prime to p, p divides ap11, it does not follow that p is prime. This leads to some terminology:

  • Fermat pseudoprime to base a is a composite number n such that a and n are relatively prime and n divides an11. (Caution: Fermat prime means something very different!)
  • Poulet number is a Fermat pseudoprime to base 2.
  • Carmichael number, also called absolute pseudoprime, is a composite natural number n such that n divides an11 for all a relatively prime to n. Equivalently, n divides ana for all a.