Randomized trial demonstrates algorithmic efficiency in solving the Brocard-Ramanujan equation, suggesting few solutions exist.
We survey and extend computational approaches to the Brocard--Ramanujan Diophantine equation n!+1=m², one of the oldest open problems linking factorials and perfect squares. After fixing notation and recalling the three known solutions---the Brown numbers $(n,m)=(4,5),(5,11),(7,71)$---we give a self-contained proof of Overholt's theorem that the $abc$ conjecture implies finiteness of the solution set, and we quantify the probabilistic heuristic predicting that no further solutions exist. Our principal focus is algorithmic. We analyze the naive ``factorial-and-square-root'' search, establish its essentially quadratic running time, and contrast it with the quadratic-residue (QR) sieve of Berndt and Galway, in which a candidate exponent n is eliminated by exhibiting a prime p with n!+1p=-1. We prove that, under standard equidistribution heuristics, the sieve eliminates a non-solution after an expected two Legendre-symbol evaluations and attains near-linear total complexity---the decisive gain that has enabled searches to n<10¹⁵. We then report original experiments: exact verification of the known solutions; validation of the sieve against brute force for n≤ 10⁴; confirmation that the number of prime tests a value passes is distributed as Bin(k,12) to within 2.3× 10⁻³; a screened search to n=10⁶; and measured speedups exceeding 440× over the naive method. We close by situating the equation within the wider landscape of polynomial--factorial Diophantine problems and distributed computational number theory.
No takes yet. Share an insight, caveat, or question.
Mainak Bagui (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: