Fermat's little theorem
Fermat's little theorem is a mathematical theorem that, for any prime 𝑝, the 𝑝th power of any integer 𝑛 is congruent to 𝑛 modulo 𝑝. It came out in 1640.
- Came out
- October 18, 1640
All 3 facts, and where they come from
Facts
3 facts · 0 confirmed by two sources · 0 cited · 3 from one source
Where this comes from
Papalocal keeps its own record. It started from these sources; what each one said is kept here as it was copied, so a change on their side never changes this page by itself. Tap one to read its version.
What Wikidata says · copied November 17, 2026 · revision 2547549773
- Described as
- mathematical theorem that, for any prime 𝑝, the 𝑝th power of any integer 𝑛 is congruent to 𝑛 modulo 𝑝
- What it is
- theorem
- Came out
- October 18, 1640
- Named after
- Pierre de Fermat
- Wikipedias with a page
- 60
Wikidata item Q188295 (wikidata.org/wiki/Q188295), public domain (CC0). Copied 2026-11-17.
What Wikipedia says · copied November 17, 2026 · revision 1383703139
In number theory, Fermat's little theorem states that if p is a prime number, then for any integer a, the number ap − a is an integer multiple of p. In the notation of modular arithmetic, this is expressed as
ap≡a(modp).
For example, if a = 2 and p = 7, then 27 = 128, and 128 − 2 = 126 = 7 × 18 is an integer multiple of 7.
If a is not divisible by p; that is, if a is coprime to p, then Fermat's little theorem is equivalent to the statement that ap − 1 − 1 is an integer multiple of p, or in symbols:
ap−1≡1(modp).
For example, if a = 2 and p = 7, then 26 = 64, and 64 − 1 = 63 = 7 × 9 is a multiple of 7.
Fermat's little theorem is the basis for the Fermat primality test and is one of the fundamental results of elementary number theory. The theorem is named after Pierre de Fermat, who stated it in 1640. It is called the "little theorem" to distinguish it from Fermat's Last Theorem.
From the Wikipedia article “Fermat's little theorem” (en.wikipedia.org/wiki/Fermat's_little_theorem), by its contributors, under CC BY-SA 4.0 (creativecommons.org/licenses/by-sa/4.0/). Copied 2026-11-17; not changed.
Confirmed Two sources agree. Cited One source, and it names where it got it. One source One source, without a reference of its own. Sources disagree The sources disagree. We show the best-supported value and keep theirs below.
Picture: Wikimedia Commons: Fermatp.PNG · See Commons file page
