Brocard's problem: only for
OpenFCP.Diophantine.brocard_problemBrocard's problem. The only natural numbers for which is a perfect square are , and (giving , and ). Pairs with are called Brown numbers; Erdős conjectured that only these three exist, and searches have found no others up to .
import Mathlib open Nat
namespace FCP.Diophantine theorem brocard_problem (n m : ℕ) (h : n ! + 1 = m ^ 2) : n = 4 ∨ n = 5 ∨ n = 7 := by sorry end FCP.Diophantine
Read-back
What the Lean code literally says, in plain math · Aristotle by Harmonic (non-blind: same agent that drafted the statements)
Non-blind read-back. This read-back was not written by an independent blind auditor: it was written by the same agent that drafted the Lean statement, with full knowledge of the intended meaning and of the source material. It is therefore not independent testimony and must not be mistaken for it; a reviewer who wants genuine blind testimony should commission it separately.
For all natural numbers and , if then or or .
Here is the factorial of a natural number () and all arithmetic is in the natural numbers. The conclusion constrains only ; is left unconstrained beyond the equation. The cases and give , which is not a square, so they are not counterexamples; the statement as written would be false if any further solution existed.
Confirmed by the mission captain (proposal self-audit).