Skip to content

Erdős Problem #398

Editorial depth: Reviewed explanatory article — evidence qualified.
Snapshot classification: falsifiable (not automatically the live result).
Subject areas: number theory, factorials.

Read this status correctly

The status above is reproduced from GCL's immutable external-catalogue snapshot. It is not a new claim of current mathematical resolution, a source-semantic review, an independent proof check, or GCL certification. A published proof and a GCL replay are separate events.

The question in plain language

Erdős Problem 398 is the Brocard–Ramanujan problem. It asks whether the positive-integer solutions of

\[ n!+1=m^2 \]

are exactly \((n,m)=(4,5),(5,11),(7,71)\). Equivalently, it asks whether \(n!=m^2-1\) has any other solution. The sign of \(m\) is immaterial, so one may take \(m\) to be a nonnegative integer; the factorial variable is a positive integer in the usual statement. The pinned Lean statement instead uses natural numbers for both variables and expresses the same intended solution set as

\[ \{n\mid \exists m,\ n!+1=m^2\}=\{4,5,7\}. \]

That normalization is useful, but it is a statement of the conjecture, not a proof of it.

The catalogue calls the problem falsifiable. In the maintained catalogue's terminology, this means that the assertion is open but a counterexample would be finite data: one pair \((n,m)\) with \(n!+1=m^2\) and \(n\notin\{4,5,7\}\). It does not mean that the problem is decidable, disproved, or independent of a foundation such as Peano arithmetic or ZFC.

A small example

The three familiar solutions can be checked exactly, without floating-point approximations:

\[ 4!+1=24+1=25=5^2, \]
\[ 5!+1=120+1=121=11^2, \]

and

\[ 7!+1=5040+1=5041=71^2. \]

The following short computation repeats the test with integer square roots for every \(n\) from \(0\) through \(20\):

from math import factorial, isqrt

hits = []
for n in range(0, 21):
    value = factorial(n) + 1
    root = isqrt(value)
    if root * root == value:
        hits.append((n, root, value))
print(hits)

Its exact output is [(4, 5, 25), (5, 11, 121), (7, 71, 5041)]. This verifies the three examples and excludes additional natural-number solutions only in that finite range. It cannot establish the universal assertion, because a possible counterexample could occur above \(20\); nor does it reproduce the much larger published search discussed below.

What is known

The live problem page describes the conjecture as unsolved and reports no other solutions below \(10^9\), referring to Berndt and Galway's computation. The historical source listed there is Erdős and Graham, Old and New Problems and Results in Combinatorial Number Theory (1980), p. 77, where the problem is recorded. The page also records two kinds of conditional or restricted progress.

Overholt's one-page 1993 paper, The Diophantine Equation \(n!+1=m^2\), in the Bulletin of the London Mathematical Society 25, p. 104, gives a finiteness result under a weak form of the Szpiro/ABC conjecture. “Only finitely many” is weaker than “only three”: even assuming that hypothesis, the cited result does not identify the complete solution set.

Naciri's 2025 paper gives unconditional finiteness in broad restricted families. Theorem 1(i), on p. 2 of the published PDF, says that for fixed \(k\geq2\) there are finitely many solutions when \(m-1\) or \(m+1\) has all prime exponents below \(k\); for the case \(k=7\), the only possible pairs are the three known ones, using the Berndt–Galway computation below \(10^9\). Theorem 1(ii) gives an analogous finite result when \(m\pm1\) has fewer than a fixed number of distinct prime divisors, and states that the prime-power case leaves only \((4,5)\). These are meaningful restrictions on the equation, not a solution of the unrestricted problem.

GCL's current state

The source-audit issue is MATH-PROGRAMME #1668, assignment ERDOS-CATALOGUE-0398-S01. Its frozen catalogue source is teorth/erdosproblems at commit 536408716724a2402bdfa7c1d764bf83d64a8c89, entry 398, Git blob 4e60263a80af6207aca494d2e1388e44fa372889. That entry records informal status falsifiable, last updated 2025-08-31, formal status unformalized, and statement formalized yes on 2025-09-01.

The pinned formal source is FormalConjectures/ErdosProblems/398.lean at commit 85f863718beeec7b58a3a1926ee92e3472bc2020, blob 0b73cb179ae2f4fd0995345f506840e2f2963739. It declares the research problem open and contains answer(sorry), followed by a proof ending in by sorry. Thus it records a formal interface with the intended quantifiers; it is not a checked proof and does not certify semantic equivalence to every historical wording. No GCL mathematical certification or Lean replay is claimed here. The Programme's V2 ledger, rather than this article, decides accepted coverage.

What remains

The central unresolved task is to prove that no further positive integer \(n\) makes \(n!+1\) a square, or to exhibit a new pair. A finite computation, even one reaching \(10^9\), supplies a falsification test and valuable evidence but cannot close an unbounded universal claim. Conditional ABC/Szpiro arguments and Naciri's restricted-family theorems likewise leave the unrestricted boundary intact.

A bounded successor should therefore preserve the exact equation and first audit the implications of each restriction, rather than relabeling a conditional or finite result as a solution. A useful deliverable would be a source-linked comparison table for the unrestricted statement, the ABC/Szpiro finiteness theorem, the 7-free theorem, and the prime-power theorem, with every hypothesis and conclusion written explicitly. Acceptance should require the cited theorem/page and a reproducible finite check; falsification would be a counterexample or a demonstrated mismatch in a claimed reduction. The task stops when that comparison is complete or when a required primary text cannot be read.

Sources and claim boundaries

The live page has no source-control revision hash, so its retrieval date is recorded rather than silently treated as the frozen catalogue snapshot. The original SOURCE RESULT/1 citation is authenticated original RESULT/1; no such comment existed when this article was written. This article reports source evidence and finite arithmetic only. It does not assert a new theorem, independence, formal proof, publication status, or mathematical certification.

Catalogue and evidence provenance

  • Pinned catalogue source: teorth/erdosproblems at 536408716724.
  • GCL issue: #1668 — protected issue/assignment identity; its labels and results are live, not reproduced automatically here.
  • GCL triage: OUTSIDE_STRICT_OPEN_TRIAGE.
  • Formal-statement coverage: A provider statement was included in the pinned snapshot. Presence does not mean the statement or proof has been checked.
  • External mathematical status: consult current problem page and its dated bibliography.

Back to catalogue · Compendium introduction