Brocard's problem: exactly for
OpenBrocard.brocard_problemBrocard's problem. The pairs of natural numbers satisfying
are exactly , and . Equivalently: is a perfect square if and only if , and in those cases equals , and respectively.
This is the Brocard–Ramanujan problem (Erdős problem #398), open since 1876. Pairs with are called Brown numbers.
Formalization Note The statement is an equality of sets of ordered pairs in ; ranges over natural numbers, and .
import Mathlib
namespace Brocard
theorem brocard_problem :
{p : ℕ × ℕ | Nat.factorial p.1 + 1 = p.2 ^ 2} = {(4, 5), (5, 11), (7, 71)} := by sorry
end BrocardRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Non-blind read-back. This read-back was written by the same agent that drafted the Lean statements of this proposal, with full knowledge of the intended meaning and of the source material. It is not independent testimony and should not be treated as a blind audit; an independent read-back is still recommended before launch.
The statement asserts an equality of two sets of ordered pairs of natural numbers (natural numbers include ). The left-hand set is
where is the usual factorial with , and the equation is an equation of natural numbers. The right-hand set is the three-element set .
The equality therefore claims both:
- each of , , satisfies (that is, , , ); and
- every pair of natural numbers with is one of these three pairs.
The quantification includes and (where , not a square) and . Negative are not considered, since is a natural number. There are no hypotheses.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.