Fermat prime Created 2026-09-24 Updated 2026-10-14
A Fermat prime is a Fermat number that is also a prime number:
The defining form alone does not imply primality. For example, is a Fermat prime, while is a Fermat number with proper divisors. For , every Fermat prime is one modulo four and two modulo three. Pépin's test gives an exact primality testing criterion for these candidates, rather than relying on their form.
Pépin's test 2026-10-14
For , Pépin's test says that the Fermat number is a prime number exactly when the displayed modular congruence holds. Modular exponentiation evaluates it by exponentiation by squaring without constructing the enormous ordinary power. The index restriction excludes , where the base itself is divisible by the candidate.[ref]
For a proof outline of sufficiency, any prime factor of a passing candidate gives multiplicative order exactly , a power of two: its half-power is , rather than . Fermat's little theorem forces , so , and hence . Conversely, for a prime candidate, ; quadratic reciprocity and Euler's criterion give the required half-power. At , the check is .
By Carl Pomerance. Slides for the ICERM meeting "Seventy-five years of Mathematics of Computation", 1–3 November 2018.
Cited passages: slide 14 states Pépin's test and outlines its proof; slides 15–16 describe Fermat numbers and their role in integer factorization; slide 18 gives the Gauss-Wantzel theorem and distinguishes Gauss's construction result from Wantzel's necessity proof. Numerical records elsewhere in these 2018 slides are historical records, not claims about current records.