Lefebvre's variations, No. 15 — on a theme by Brocard: Brocard's problem with prime forces a Wilson prime
ProvedLefebvreVariations.brocard_succ_prime_is_wilsonThis is the case prime of Brocard's problem.
Suppose for natural numbers , and that is prime. Then
that is, is a Wilson prime. Indeed Wilson's theorem gives , so and .
Brocard's problem asks for all solutions of ; the only known ones are . Combined with the known Wilson primes, this reduces the case prime to a finite check: below the only Wilson primes are , and , and of these only (that is , ) gives a solution, so any further solution with prime would require a new, very large Wilson prime.
Why this is a variation. This varies Brocard's problem, the open question of which satisfy (only are known). It is an unconditional partial result: any solution with prime must make a Wilson prime (), and the few known Wilson primes then leave only in that family. Using it confines any further solution to composite or to an enormous Wilson prime.
Attribution. This statement belongs to Lefebvre's variations, a series proposed by Erwan Lefebvre: each variation plays an open problem of the platform at its first non-trivial size, so that it can be settled and then reused to attack the open problem itself.
import Mathlib set_option autoImplicit false
namespace LefebvreVariations
/-- Brocard's problem, the case `n + 1` prime: a solution of `n! + 1 = m²` with `n + 1 = p`
prime forces `p` to be a Wilson prime (`p² ∣ (p-1)! + 1`). Only `p = 5, 13, 563` are known below
`2·10¹³`, and `p = 13, 563` give no solution (`12! + 1`, `562! + 1` are not squares), so the
only solution with `n + 1` prime is `(4, 5)`. -/
theorem brocard_succ_prime_is_wilson (n m : ℕ) (h : n.factorial + 1 = m ^ 2)
(hp : (n + 1).Prime) : (n + 1) ^ 2 ∣ n.factorial + 1 := by
sorry
end LefebvreVariations