Math-480 · mathematics · Number theory

Math-480

Are there only finite Fermat Primes?

Status Open · unsolvedmath.comLLM status Open unverified

Top Open Problems openaigpt 6 astra ultra Not reported cataloguedOpenOpen

Statement

Definitions and mathematical statement

For each integer $n\ge0$, the Fermat number is \[ F_n=2^{2^n}+1. \] A Fermat prime is a member of this sequence with no positive divisors other than one and itself. Determine whether the index set \[ \{n\in{\mathbb{Z}}_{\ge0}:F_n\text{ is prime}\} \] is infinite or finite. This is a binary determination problem, not a requirement to prove infinitude in advance. Proving compositeness for any finite set of further terms does not establish eventual compositeness, and hence does not by itself establish finiteness of the prime terms.

Formulation and concept references: [S1].

Short English statement

Are there infinitely many prime Fermat numbers, or are only finitely many terms of this specific sequence prime?

Sources

Catalogue entry

Statement licence: CC-BY-4.0 · Source file

Contributions 1

Math-480-A1 · Exploration · LLM-generated · gpt 6 astra ultra ·

gpt 6 astra ultra attempt on Math-480

Are there only finite Fermat Primes?

Definitions and mathematical statement

For each integer $n\ge0$, the Fermat number is \[ F_n=2^{2^n}+1. \] A Fermat prime is a member of this sequence with no positive divisors other than one and itself. Determine whether the index set \[ \{n\in{\mathbb{Z}}_{\ge0}:F_n\text{ is prime}\} \] is infinite or finite. This is a binary determination problem, not a requirement to prove infinitude in advance. Proving compositeness for any finite set of further terms does not establish eventual compositeness, and hence does not by itself establish finiteness of the prime terms.

Formulation and concept references: [S1].

Short English statement

Are there infinitely many prime Fermat numbers, or are only finitely many terms of this specific sequence prime?

Research attempt

Scope and literature check (27 September 2026).
This GPT-6 Astra Ultra attempt treats the question as a choice between infinitely many and finitely many prime terms. Neither alternative is assumed in advance. The elementary facts about the first five terms and Euler's factor of the sixth are recorded in [S1]. Tsumura's primary paper [E1] gives other primality tests and recalls the classical setting. A test for one input is not a theorem about infinitely many indices. The arguments here rederive the relevant certificates and investigate two possible uniform approaches: divisibility obstructions and the iteration underlying Pépin's criterion.

No global resolution was established by this source check. In particular, the numerical frontier in an old survey is not treated as a current exhaustive computation. Only small terms actually verified below are used in the finite record. The partial results are the exact prime-divisor restriction, a limitation on every fixed finite sieve, and a complete primality certificate whose quantifiers remain finite.

Lemma 476.1: the product identity gives new divisors, not new prime terms.
For every $n\geq1$, \begin{equation}\label{wsref-0-61-34-37-36-3a-70-72-6f-64-75-63-74} \prod_{j=0}^{n-1}F_j=F_n-2. \end{equation} For $n=1$ both sides are three. Multiplying the identity by $F_n=2^{2^n}+1$ gives \[ (2^{2^n}-1)(2^{2^n}+1)=2^{2^{n+1}}-1=F_{n+1}-2, \] which proves the induction. If $m<n$, a common divisor of $F_m$ and $F_n$ divides both $F_n-2$ and $F_n$, hence divides two. Every Fermat number is odd, so \begin{equation}\label{wsref-0-61-34-37-36-3a-63-6f-70-72-69-6d-65} \gcd(F_m,F_n)=1\quad(m\ne n). \end{equation} Consequently there are infinitely many different primes among the prime divisors of all the $F_n$: choose one divisor from each term, and none can repeat. This conclusion allows every sufficiently late $F_n$ to be composite. Pairwise coprimality does not say that any chosen term has only one prime factor, or has exponent one in its factorization.

The distinction can be made without relying on the conjecture. List the ordinary primes $p_1,p_2,\ldots$ and put $a_j=p_{2j-1}p_{2j}$. Then the $a_j$ are pairwise coprime and all composite. This is not a model of the Fermat recurrence, but it disproves the inference from pairwise coprimality alone to infinitely many prime terms.

Lemma 476.2: exact order restrictions on a prime divisor.
If an odd prime $q$ divides $F_n$, then \begin{equation}\label{wsref-0-61-34-37-36-3a-6f-72-64-65-72} \operatorname{ord}_q(2)=2^{n+1}. \end{equation} Indeed $2^{2^n}\equiv-1\pmod q$, so the order divides $2^{n+1}$ and does not divide $2^n$. Every divisor of $2^{n+1}$ is a power of two; the order must therefore be the full power. Lagrange's theorem in $(\mathbb Z/q\mathbb Z)^\times$ gives $2^{n+1}\mid q-1$.

For $n\geq2$ there is one further factor of two: \begin{equation}\label{wsref-0-61-34-37-36-3a-66-61-63-74-6f-72-66-6f-72-6d} q\equiv1\pmod{2^{n+2}}. \end{equation} The first restriction already gives $q\equiv1\pmod8$. The quadratic character formula $(2/q)=(-1)^{(q^2-1)/8}$ then makes two a quadratic residue. Euler's criterion gives $2^{(q-1)/2}\equiv1\pmod q$, so the order $2^{n+1}$ divides $(q-1)/2$. This proves (a476:factorform). These familiar quadratic-reciprocity facts are standard arithmetic inputs; no probabilistic assumption is involved. The exceptions matter: $F_0=3$ and $F_1=5$ do not obey the strengthened modulus written with their respective indices.

Conversely, a prime has order $2^{n+1}$ for two if and only if it divides $F_n$. If the order is that number, $2^{2^n}$ has order two modulo $q$, and the only element of order two in the prime field is $-1$. Thus the prime-divisor set is described exactly by an order condition, not just by an arithmetic progression. Most primes in the progression need not meet the order condition.

For example $641=5\cdot2^7+1$ is of the required form for $n=5$. To certify its divisibility without a large decimal division, observe \[ 641=5^4+2^4=5\cdot2^7+1. \] Modulo $641$, raising $5\cdot2^7\equiv-1$ to the fourth power and substituting $5^4\equiv-2^4$ gives $-2^{32}\equiv1$. Hence $641\mid F_5$, and it is a proper factor since $1<641<F_5$. In fact $F_5=641\cdot6700417$, an equality checked by integer multiplication. The argument for compositeness does not require a primality proof for either factor.

A precise obstruction to a fixed finite congruence cover.
Suppose one proposes to prove eventual compositeness using finitely many fixed odd primes $q_1,\ldots,q_r$, by showing that every sufficiently large $F_n$ is divisible by one of them. This is impossible. By (a476:coprime), each $q_i$ divides at most one member of the entire sequence, so the proposed set covers at most $r$ indices.

More quantitatively, for any fixed bound $B$, at most $\pi(B)$ Fermat numbers have a prime divisor at most $B$. Thus all sufficiently late terms have no prime divisor below $B$. This statement is compatible both with large prime terms and with products of large primes. It does not give a single uniform bound on how many prime factors occur.

In fact (a476:factorform) supplies the stronger explicit lower bound $q\geq2^{n+2}+1$ for $n\geq2$. Since $\log_2F_n$ is about $2^n$, such a lower bound is still far smaller than $\sqrt{F_n}$. It leaves ample room for proper factors. A test looking only for small divisors eventually finds none for structural reasons, whether or not the input is prime.

This excludes a particular common proof strategy, not every finite description of an infinite divisibility argument. A rule producing a different prime or composite divisor depending on $n$ would evade the obstruction and could be decisive, but no such rule for all large $n$ is provided here. Dirichlet's theorem about primes in a progression also does not supply a divisor of a prescribed integer in that progression.

Proposition 476.3: Pépin's criterion, with both directions proved.
For every $n\geq1$, \begin{equation}\label{wsref-0-61-34-37-36-3a-70-65-70-69-6e} F_n\text{ is prime} \quad\Longleftrightarrow\quad 3^{(F_n-1)/2}\equiv-1\pmod{F_n}. \end{equation} Proof of necessity. Put $p=F_n$ and assume it is prime. Since $2^n$ is positive and even, $2^{2^n}\equiv4\pmod{12}$, so $p\equiv5\pmod{12}$. The quadratic-character formula for three gives $(3/p)=-1$ in this residue class. Euler's criterion is precisely the displayed congruence.

Proof of sufficiency. Suppose the congruence holds and let $q$ be any prime divisor of $F_n$. Reduction modulo $q$ gives the same congruence. In particular $q\ne3$. Write $F_n-1=2^M$ with $M=2^n$. The order of three modulo $q$ divides $2^M$, since the square of $3^{2^{M-1}}$ is one, but it does not divide $2^{M-1}$, since $-1\ne1$ modulo the odd prime $q$. Hence its order is $2^M=F_n-1$. It divides $q-1$, giving $q\geq F_n$. Since $q\mid F_n$, necessarily $q=F_n$, proving primality. This also excludes composite prime powers; no squarefreeness was assumed.$\square$

The case $n=0$ is handled separately: $F_0=3$ is prime but the base three congruence is not a valid test for it. A Fermat congruence with base two would be useless for the present purpose: every $F_n$, prime or composite, already satisfies $2^{2^n}\equiv-1$. The special base and exponent in (a476:pepin) are doing real work.

The test as an exact finite computation.
Set $r_0=3$ and repeatedly square modulo $F_n$: \[ r_{j+1}\equiv r_j^2\pmod{F_n}. \] After exactly $2^n-1$ squarings, $r_j$ represents $3^{2^{2^n-1}}=3^{(F_n-1)/2}$. Testing whether the final residue is $F_n-1$ therefore decides the primality of that one term. The number of squarings is exponential in the index $n$, but only linear in the binary length of $F_n$, which is $2^n+1$. This separates the short description of the input from the length of the integer actually processed.

The companion exact-integer calculation checks $1\leq n\leq10$. It certifies primality for $n=1,2,3,4$ and rejects all the tested $n=5,\ldots,10$. Together with the separate check of $F_0$, this recovers the five small prime terms. Every rejected input is composite by the proved equivalence, whether or not a factor is found. These eleven finite cases do not certify a cutoff after which all terms are composite.

An inductive shortcut would need to relate the final residues at two successive indices. The underlying moduli do satisfy \begin{equation}\label{wsref-0-61-34-37-36-3a-72-65-63-75-72-72-65-6e-63-65} F_{n+1}=(F_n-1)^2+1, \end{equation} but they are coprime. A congruence modulo $F_n$ does not determine a congruence modulo $F_{n+1}$. Indeed the Chinese remainder theorem allows any residue modulo the first modulus to coexist with any residue modulo the second for a suitable integer. This observation is not a claim that the particular powers of three are independent; it identifies why a proof must use more than reduction of a previous residue.

The heuristic track and its exact logical limit.
A very crude random-integer heuristic assigns an integer near $F_n$ a prime probability of order $1/\log F_n\asymp2^{-n}$. The sum over $n$ converges. If one actually had random events with summable probabilities, the first Borel--Cantelli lemma would imply that only finitely many occur almost surely. Fermat primality is a deterministic sequence, and no probability space with a theorem transferring that conclusion to this sequence has been constructed. The heuristic is not a proof of finiteness.

Nor is it consistent to ignore all the special order restrictions while claiming an exact probabilistic prediction. Conditioning a model on the absence of prohibited divisors changes its probabilities, and those conditioning events vary with $n$. Conversely, an informal model giving a positive probability of further prime terms would not prove that even one further term is prime. The elementary work here supports neither probabilistic conclusion as a theorem about the actual $F_n$.

One can state the missing global alternatives precisely. An infinitude proof must, for every $N$, find $n>N$ satisfying the Pépin congruence or provide some other primality certificate. A finiteness proof must produce a single $N$ beyond which that congruence always fails, or uniformly exhibit proper factors. Computing each next input terminates, but the universal assertion over all later inputs does not follow from the termination of any finite collection of these computations.

Verification and outcome.
Besides the Pépin residues, the finite script checks the product identity, all pairwise gcds in the tested range, the factor $641$, and the order/congruence assertions for prime divisors found in a bounded trial sieve. All computations are exact; no probable-prime output is silently used as a proof. The general statements rest on the displayed algebraic arguments, not on that bounded search.

UNRESOLVED. The attempt establishes useful exact certificates and rules out fixed-prime covering and naive coprimality arguments. It does not choose between finite and infinite prime index sets. The first remaining task is a genuinely uniform argument about the order conditions or the Pépin residues across unbounded indices. No new Fermat prime, eventual-compositeness theorem, or novelty claim is made.

Sources

Go to contribution →