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.
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]
Observations on a certain theorem of Fermat and on others concerning prime numbers by Leonhard Euler. pp. 1–2 and the publication note
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 each positive integer , the product of the preceding Fermat numbers is two less than the next:For example, . The identity telescopes by repeated difference of squares: . Its usefulness is that a huge integer product exposes a tiny difference, two, from the next term.
If , a common divisor of and divides both , by the Fermat number product identity, and . It therefore divides two. Both Fermat numbers are odd integers, so their greatest common divisor is one. Each term's prime factors are consequently different from the prime factors of every other term.
For a prime number , the exact criterion iswhere 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.
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.
For , the first order bound already gives . The second supplementary law for quadratic reciprocity says that two is then a quadratic residue modulo . Euler's criterion gives , so its multiplicative order divides . Thus , further reducing the candidate factors. At , meets this bound. The restriction matters: has factor five, which is not one modulo eight.
Articles by others on the same topic
A Fermat number is a specific type of integer that can be expressed in the form: \[ F_n = 2^{2^n} + 1 \] where \( n \) is a non-negative integer. Fermat numbers were named after Pierre de Fermat, a French mathematician, who studied these numbers in the 17th century.

