Fermat's little theorem: Difference between revisions

From Number
(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...')
 
 
Line 22: Line 22:
* [[Euler's theorem]]: This is a general version which states that if <math>a</math> and <math>n</math> are relatively prime, then <math>a^{\phi(n)} \equiv 1 \mod n</math> where <math>\phi(n)</math> is the [[Euler phi-function]] of <math>n</math>, i.e., the number of natural numbers less than or equal to <math>n</math> that are relatively prime to <math>n</math>. The Euler ph-i-function of a prime <math>p</math> is <math>p - 1</math>, so this is a generalization.
* [[Euler's theorem]]: This is a general version which states that if <math>a</math> and <math>n</math> are relatively prime, then <math>a^{\phi(n)} \equiv 1 \mod n</math> where <math>\phi(n)</math> is the [[Euler phi-function]] of <math>n</math>, i.e., the number of natural numbers less than or equal to <math>n</math> that are relatively prime to <math>n</math>. The Euler ph-i-function of a prime <math>p</math> is <math>p - 1</math>, so this is a generalization.
* [[Groupprops:Order of element divides order of group|Order of element divides order of group]]: In a finite group, the order of any element divides the order of the group. This is a corollary of [[Groupprops:Lagrange's theorem|Lagrange's theorem in group theory]]. Fermat's little theorem is a special case of this where the group is the multiplicative group modulo <math>p</math>, which has order <math>p-1</math>.
* [[Groupprops:Order of element divides order of group|Order of element divides order of group]]: In a finite group, the order of any element divides the order of the group. This is a corollary of [[Groupprops:Lagrange's theorem|Lagrange's theorem in group theory]]. Fermat's little theorem is a special case of this where the group is the multiplicative group modulo <math>p</math>, which has order <math>p-1</math>.
* [[Primitive roots exist modulo primes]]: For any prime <math>p</math>, there exists a natural number <math>a</math> relatively prime to <math>p</math> such that <math>p-1</math> is precisely equal to the order of <math>a</math> mod <math>p</math>: in other words, no smaller power of <math>a</math> is <math>1</math> modulo <math>p</math>. Such an <math>a</math> is termed a [[primitive root]]. This follows from the fact that the [[Groupprops:Multiplicative group of a prime field is cyclic|multiplicative group of a prime field is cyclic]], which in turn follows from the more general fact that [[Groupprops:Multiplicative group of a field implies every finite subgroup is cyclic]].
* [[Primitive roots exist modulo primes]]: For any prime <math>p</math>, there exists a natural number <math>a</math> relatively prime to <math>p</math> such that <math>p-1</math> is precisely equal to the order of <math>a</math> mod <math>p</math>: in other words, no smaller power of <math>a</math> is <math>1</math> modulo <math>p</math>. Such an <math>a</math> is termed a [[primitive root]]. This follows from the fact that the [[Groupprops:Multiplicative group of a prime field is cyclic|multiplicative group of a prime field is cyclic]], which in turn follows from the more general fact that [[Groupprops:Multiplicative group of a field implies every finite subgroup is cyclic|multiplicative group of a field implies every finite subgroup is cyclic]].


===Other related facts===
===Other related facts===

Latest revision as of 22:25, 19 April 2009

Statement

For a relatively prime number

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

  1. (Divisibility form): divides .
  2. (Congruence form): .
  3. (Order of element modulo another): The order of modulo divides .

For a not necessarily relatively prime number

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

  1. (Divisibility form): divides .
  2. (Congruence form): .

Related facts

Stronger facts

  • Euler's theorem: This is a general version which states that if and are relatively prime, then where is the Euler phi-function of , i.e., the number of natural numbers less than or equal to that are relatively prime to . The Euler ph-i-function of a prime is , so this is a generalization.
  • Order of element divides order of group: In a finite group, the order of any element divides the order of the group. This is a corollary of Lagrange's theorem in group theory. Fermat's little theorem is a special case of this where the group is the multiplicative group modulo , which has order .
  • Primitive roots exist modulo primes: For any prime , there exists a natural number relatively prime to such that is precisely equal to the order of mod : in other words, no smaller power of is modulo . Such an is termed a primitive root. This follows from the fact that the multiplicative group of a prime field is cyclic, which in turn follows from the more general fact that multiplicative group of a field implies every finite subgroup is cyclic.

Other related facts

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

Converse

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

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