Fermat number Created 2026-10-07 Updated 2026-10-13
A Fermat number is the positive integer , indexed by a nonnegative integer . The first five are , all prime numbers; the next is the composite number . This family offers a compact lesson in number theory: a very persuasive finite pattern can fail, while an exact divisibility relation settles a gigantic case with little computation.
Figure 1.
Exact Fermat numbers: five initial primes, a composite sixth term, and rapidly increasing decimal lengths
. Details.
Why does the exponent itself have the form ? Suppose is a positive integer with an odd integer factor . The polynomial factorization shows that is a proper divisor of . Consequently, if is a prime number, must be a power of two. That is a necessary condition, rather than a promise that the surviving candidates are prime.
The Fermat number product identity makes distinct Fermat numbers coprime integers. Thus every term has a prime factor absent from all earlier terms, whether or not that term is itself a prime number. This gives an explicit route to infinitely many different prime numbers, without establishing that infinitely many terms of this particular sequence are prime. Meanwhile the prime divisor of a Fermat number criterion filters possible factors through a small multiplicative order calculation.
The family also links arithmetic to Euclidean geometry: a constructible regular polygon can have a number of sides equal to a power of two times a product of distinct Fermat primes. The Gauss-Wantzel theorem gives the precise criterion. For instance, and qualify, but does not. The word "distinct" matters. Carl Pomerance describes this connection in Primality testing: then and now by Carl Pomerance (slide 18).
Historically, Leonhard Euler records Pierre de Fermat's proposed primality pattern, then refutes it by finding the factor of . His paper was presented in 1732 and published in 1738; those are different events, not competing dates for one publication.[ref]
A short modern check needs only two representations of :
In modular arithmetic these give and . Substitution yields , so . This verifies the factor directly; it does not claim to reconstruct Euler's search process.
For , Euler's theorem allows , since are coprime integers. At every congruence holds and one may take . Let be the multiplicative order of modulo . Write a nonnegative exponent with using the Euclidean division. Then , so implies by minimality of . Thus . Negative exponents, if included, give the same conclusion using the inverse residue of .
A prime divisor of a Fermat number is odd, and satisfies . Therefore , so its multiplicative order divides . It does not divide , since modulo the odd prime. Every divisor of is a power of two, hence
By Fermat's little theorem and the divisibility just proved, , giving .
Fermat's little theorem says that for a prime and , ; equivalently for every integer . The Wilson theorem says for a prime (and, conversely, this congruence characterizes primes among integers greater than one).
For , is a square root of minus one modulo a prime. If is odd and , Fermat's little theorem gives
so is even and . Conversely, put . Pairing with in the factorial gives . For , is even, so the Wilson theorem yields . Thus
and in the latter case supplies a solution.
For the multiplicative order assertion, divide by : , . Since and , it follows that . Minimality of the positive order excludes , hence and
In particular by Fermat's little theorem. Negative , if included, are handled by the same division using the modular inverse of .
A Fermat number in the paper has . If a prime divides , it is odd and . Squaring gives , so the order divides . It does not divide , since modulo an odd prime. Every divisor of is a power of two, so the only possibility is
If two different Fermat numbers shared a prime factor, the same element modulo that prime would have two different orders. This is impossible, proving pairwise coprimality. Also , so for every such prime is modulo . No prime modulo can occur.
A prime modulo need not occur: take . It is prime, , and . Since the order divides , the first congruence excludes every divisor of and the second excludes ; hence the order is . This is not a power of two, so is not a prime divisor of a Fermat number. The index restriction matters: the conventional extra number is outside the paper's positive- family.
Prime divisor of a Fermat number Created 2026-10-07 Updated 2026-10-14
For a prime number , the exact criterion is
where must be different from two and is the multiplicative order of two modulo . If , then : the order divides but not , so it is exactly . Conversely, that order makes a square root of unity different from one in the prime field ; it must be , because has no other roots in a field.
Figure 1.
Exact modular powers distinguish Fermat divisors from the prime thirteen, whose multiplicative order is twelve
. Details.
For example, modulo seventeen the powers of two are . Their first return to one occurs after eight steps. The half-way value is , proving that . Likewise, identifies as a prime factor of . These are statements about divisibility, not evidence that the entire Fermat number is prime.
The multiplicative order always divides , by Fermat's little theorem, so . In particular, for every prime divisor of a Fermat number is one modulo four. That weaker modular congruence is insufficient: thirteen is one modulo four, but , which is not a power of two. It divides no Fermat number at any index. The exact order criterion explains the whole family, instead of testing finitely many terms.