What is Fermat's little theorem

  • Thread starter Greg Bernhardt
  • Start date
  • Tags
    Theorem
In summary, Fermat's little theorem states that if p is a prime number and a is any integer, then a raised to the power of p minus a will be divisible by p. This can also be written as a raised to the power of p-1 being equivalent to 1 modulo p, or a raised to the power of p being equivalent to a modulo p. This result can be proven using Lagrange's theorem and the existence of multiplicative inverses modulo p. A corollary of this theorem is that for any prime p and integer a, a raised to the power of p will be equivalent to a modulo p.
  • #1
19,439
10,013
Definition/Summary

Fermat's little theorem states that if [itex]p[/itex] is a prime number, then for any integer [itex]a[/itex], [itex]a^{p}-a[/itex] will be divisible by

Equations

[tex]a^{p-1}\equiv1\pmod p \quad (\text{for\ }a \not\equiv 0 \pmod p)[/tex]

[tex]a^p\equiv a\pmod p[/tex]

Extended explanation

Fermat's Little Theorem
If p is a prime number and a an integer, then
[tex]a^p\equiv a\ (p)[/tex]


In order to prove Fermat's Little theorem, we will start by proving a superficially slightly weaker result, which is also referred to as Fermat's Little Theorem, on occasion. The two results imply each other, however.

Theorem
Let a and p be coprime, then

[tex]a^{p-1}-1 \equiv 0\ (p).[/tex]

Proof
Start by listing the first p-1 positive multiples of a:

[tex]a, 2a, 3a, \ldots, (p -1)a[/tex]

Suppose that [itex]ra[/itex] and [itex]sa[/itex] are the same modulo [itex]p[/itex], with [itex]0 <r,s < p[/itex]. Since [itex]a[/itex] is nonzero mod [itex]p[/itex], we can cancel, giving [itex]r \equiv s\ (p)[/itex]. So the [itex]p-1[/itex] multiples of [itex]a[/itex] above are distinct and nonzero; that is, they must be congruent to [itex]1, 2, 3, \ldots, p-1[/itex] in some order. Multiply all these congruences together and we find

[tex]a2a3a\ldots (p-1)a \equiv 1.2.3\ldots(p-1)\ (p)[/tex]

or better,

[tex]a^{p-1}(p-1)! \equiv\ (p-1)! (mod p)[/tex].

Divide both side by (p-1)! to complete the proof.

Remark
This result can be proven by appeal to Lagrange's theorem, since the non-zero residues form a group modulo [itex]p[/itex]. Although we haven't proven, they are a group, we are explicitly using that multiplicative inverses modulo [itex]p[/itex] exist, which is an elementary application of Euclid's algorithm.



Corollary
Let [itex]p[/itex] be a prime and [itex]a[/itex] any integer, then [itex]a^p \equiv a\ (p)[/itex].
Proof
The result is trival (both sides are zero) if [itex]p[/itex] divides [itex]a[/itex]. If not then we need only multiply the congruence in Fermat's Little Theorem by [itex]a[/itex] to complete the proof.

* This entry is from our old Library feature. If you know who wrote it, please let us know so we can attribute a writer. Thanks!
 
Mathematics news on Phys.org

1. What is Fermat's little theorem?

Fermat's little theorem is a fundamental theorem in number theory, named after the French mathematician Pierre de Fermat. It states that for any prime number p, and any integer a not divisible by p, a raised to the power of p-1 is congruent to 1 modulo p. In other words, if a is not divisible by p, then a^(p-1) ≡ 1 (mod p).

2. How is Fermat's little theorem useful?

Fermat's little theorem has a wide range of applications in number theory, cryptography, and computer science. It is used to prove the primality of numbers, to generate large prime numbers for encryption, and to optimize certain algorithms in computer science.

3. Can Fermat's little theorem be generalized?

Yes, Fermat's little theorem can be generalized to what is known as Fermat's little theorem for composite numbers. This states that for any positive integer n, and any integer a relatively prime to n, a raised to the power of φ(n) is congruent to 1 modulo n, where φ(n) is the Euler totient function.

4. Is Fermat's little theorem always true?

Yes, Fermat's little theorem is a proven theorem and is always true for any prime number p and any integer a not divisible by p. It has been extensively tested and used in various mathematical and computational applications with successful results.

5. How is Fermat's little theorem different from Fermat's Last Theorem?

Fermat's little theorem and Fermat's Last Theorem are two separate theorems named after the same mathematician, Pierre de Fermat. However, they are fundamentally different. Fermat's little theorem deals with modular arithmetic and has a proof, while Fermat's Last Theorem is a famous conjecture that states that no three positive integers a, b, and c can satisfy the equation a^n + b^n = c^n for any integer value of n greater than 2.

Similar threads

Replies
1
Views
751
  • Precalculus Mathematics Homework Help
Replies
6
Views
856
  • Precalculus Mathematics Homework Help
Replies
8
Views
798
  • Precalculus Mathematics Homework Help
Replies
5
Views
961
  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
14
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
620
  • Precalculus Mathematics Homework Help
Replies
14
Views
1K
Replies
1
Views
938
Back
Top