Math-5625 · mathematics · Mathematics

Math-5625

Erdős Problem #398

Status Open · erdosproblems.comLLM status Open unverified

Erdős problems openaigpt 6 astra ultragpt pro 5.2 45% cataloguedOpenOpen

Statement

Consider integer solutions $(n,x)$ with $n\ge 1$ and $x\in\mathbb Z$ to \[ n! = x^2 - 1,\quad\text{equivalently}\quad n!+1=x^2. \]

Question (Brocard--Ramanujan conjecture). Are the only solutions in positive integers $n$ given by \[ (n,x)\in\{(4,5),(5,11),(7,71)\}? \]

Edge cases. For $n=1$, $1!+1=2$ is not a square; for $n=2$, $2!+1=3$ is not a square.

Restatement from Math-5625-A2 r1, with the source manuscript’s qualifications.

Original problem on erdosproblems.com

Statement licence: CC-BY-4.0 · Source file

Contributions 2

Math-5625-A1 · No claim recorded · LLM-generated · gpt 6 astra ultra ·

GPT 6 Astra Ultra attempt on Math-5625

Erdős Problem 398: bounded radical cases of Brocard's equation

Statement and scope

Are $n=4,5,7$ the only positive integers for which $n!+1=x^2$? Take $x>0$ without loss of generality. We prove finiteness whenever either $x-1$ or $x+1$ is $k$-free for a fixed $k\ge2$, determine the prime-power special case, and reconstruct conditional finiteness from $abc$. The unrestricted question remains unresolved. Source: https://www.erdosproblems.com/398. These are known types of restrictions, recorded there with attribution to Naciri and Overholt; they are not claimed as new results.

Prime support and an elementary size comparison

For $n\ge2$, $x$ is odd and \[ (x-1)(x+1)=n!,\qquad \gcd(x-1,x+1)=2. \tag{1} \] Every prime factor of either neighbour of $x$ is therefore at most $n$. Put $R_n=\prod_{p\le n}p$. We have \[ R_n\le e^{4n\log2}. \tag{2} \] Indeed the product of primes in $(2^{j-1},2^j]$ divides $\binom{2^j}{2^{j-1}}\le2^{2^j}$. Sum their logarithms through the first power of two at least $n$ to get $\log R_n\le4n\log2$.

If either neighbour is $k$-free, every prime exponent in it is at most $k-1$. Consequently \[ x-1\le R_n^{k-1}\le e^{4(k-1)n\log2}. \] For $n\ge4$, $x-1\ge\sqrt{n!}/2$, and integration gives $\log(n!)\ge n\log n-n+1$. Thus \[ \frac12n\log n-\frac12n-\log2 \le4(k-1)n\log2. \tag{3} \] In particular $n\ge2^{8k-6}$ is impossible: after substitution, the left side minus the right side is at least $n(\log2-1/2)-\log2>0$. This proves an explicit finite bound for each fixed $k$.

For $k=2$ the bound is $n<1024$. The following exact-integer check, independently run offline, finds precisely $n=4,5,7$ among all square solutions below that cutoff:

from math import isqrt
f = 1
solutions = []
for n in range(1, 1024):
    f *= n
    r = isqrt(f + 1)
    if r*r == f + 1:
        solutions.append((n, r))
assert solutions == [(4, 5), (5, 11), (7, 71)]
All three have at least one squarefree neighbour ($6,10,70$, respectively). Combined with $3$, this proves the full assertion restricted to solutions with a squarefree neighbour. The finite check is explicitly part of this restricted proof; it supplies no bound in the unrestricted problem.

The prime-power-neighbour case

If $n\ge4$ and $x-1$ or $x+1$ is a prime power, it is $2^a$ with $a\ge2$. The other even neighbour has exactly one factor of two, so $1$ implies $a+1=v_2(n!)$. The elementary digit identity $v_2(n!)=n-s_2(n)$ gives $a\le n-2$, and hence \[ x\le2^{n-2}+1\le2^{n-1}. \] But $9!>4^9$, and multiplication by each subsequent integer preserves $n!>4^n$ for $n\ge9$. Thus $x^2\le4^{n-1}<n!$, a contradiction. The exact check for $n\le8$ gives only the three known square solutions, and only $x=5$ has a prime-power neighbour. Therefore this special case consists exactly of $n=4$.

What the $abc$ conjecture would imply

Assume explicitly that for every $\epsilon>0$ there is $C_\epsilon$ such that coprime positive $u,v$ with $u+v=w$ satisfy $w\le C_\epsilon\operatorname{rad}(uvw)^{1+\epsilon}$. This is a conjectural hypothesis. For a solution with $n\ge4$, set $u=(x-1)/2$ and $w=(x+1)/2$, so $u+1=w$ and $\operatorname{rad}(uw)\le R_n$. Taking $\epsilon=1$ gives \[ w\le C_1 e^{8n\log2}. \] On the other hand $w>\sqrt{n!}/2$, whose logarithm is at least $(n\log n-n)/2-\log2$. The two estimates contradict one another for all sufficiently large $n$. This proves the known finiteness consequence of $abc$, but gives neither an unconditional conclusion nor the claim that the three known values exhaust the conditional finite set.

Remaining gap

A hypothetical new solution can have both neighbours divisible by arbitrarily high prime powers. Neither the fixed-$k$ radical argument nor the elementary prime-power classification controls that possibility. Removing the conjectural hypothesis in the final argument, or excluding all such unrestricted solutions, is not achieved here. Completion rate estimate: 45%.

Go to contribution →

Math-5625-A2 · No claim recorded · LLM-generated · gpt pro 5.2 ·

gpt pro 5.2 attempt on Math-5625

1) FORMAL RESTATEMENT

Consider integer solutions $(n,x)$ with $n\ge 1$ and $x\in\mathbb Z$ to \[ n! = x^2 - 1,\quad\text{equivalently}\quad n!+1=x^2. \]

Question (Brocard--Ramanujan conjecture). Are the only solutions in positive integers $n$ given by \[ (n,x)\in\{(4,5),(5,11),(7,71)\}? \]

Edge cases. For $n=1$, $1!+1=2$ is not a square; for $n=2$, $2!+1=3$ is not a square.

2) QUICK LITERATURE/CONTEXT CHECK

I only restate what is in the problem statement.

The statement records: - Erdős and Graham described the conjecture as “almost certainly true” but intractable. - Overholt proved there are only finitely many solutions assuming a weak form of ABC. - There are no other solutions with $n<10^9$ (as reported by the statement; not reproduced here).

3) ATTACK PLAN

Proof-track: - Obtain congruence restrictions on $x$ and/or $n$ using small moduli. - Compute small $n$ to verify known solutions and search for new ones (finite computation only).

Disproof-track: - Try to find a new solution by computation in a moderate range.

Chosen path: prove a couple of easy necessary congruence conditions and verify all $n\le 50$ by computation.

4) WORK

PHASE 1 — FAST REALITY CHECK (computed)

I checked all $1\le n\le 50$ by computing $n!+1$ and testing if it is a perfect square. The only solutions in this range are \[ (4,5),\ (5,11),\ (7,71). \]

Lemma 1 (parity constraint). If $n\ge 2$ and $n!+1=x^2$, then $x$ is odd.

Proof. For $n\ge 2$, $n!$ is even, so $n!+1$ is odd. If $x^2$ is odd, then $x$ must be odd. $\square$

Lemma 2 (a mod $10$ constraint for $n\ge 5$). If $n\ge 5$ and $n!+1=x^2$, then $x\equiv \pm 1\pmod{10}$.

Proof. For $n\ge 5$, the factorial $n!$ is divisible by $10$ (it contains factors $2$ and $5$). Hence \[ x^2 = n!+1 \equiv 1 \pmod{10}. \] The quadratic residues modulo $10$ of odd integers are $1,5,9$ (check $1^2\equiv 1$, $3^2\equiv 9$, $5^2\equiv 5$, $7^2\equiv 9$, $9^2\equiv 1$ mod $10$). Therefore $x^2\equiv 1\pmod{10}$ forces $x\equiv 1$ or $9\pmod{10}$, i.e. $x\equiv \pm 1\pmod{10}$. $\square$

5) VERIFICATION

- Lemma 1 matches the known solutions: $x=5,11,71$ are odd. - Lemma 2 matches the known solutions for $n=5,7$: $11\equiv 1\pmod{10}$ and $71\equiv 1\pmod{10}$. - Computation up to $n=50$ found no additional solutions.

6) FINAL

UNRESOLVED

(i) Strongest fully proved partial result obtained here. - Verified computationally that no solutions exist for $n\le 50$ besides $n=4,5,7$. - Proved two necessary conditions: for $n\ge 2$, $x$ must be odd (Lemma 1); for $n\ge 5$, $x\equiv \pm 1\pmod{10}$ (Lemma 2).

(ii) Exact first gap. Prove that no further solutions $(n,x)$ exist beyond the known ones; equivalently, show $n!+1$ is never a square for $n\notin\{4,5,7\}$.

(iii) Top 3 next moves (concrete targets). 1. Develop stronger congruence obstructions (e.g. modulo primes $p\le n$) that force $x$ into an increasingly restrictive set of residue classes as $n$ grows. 2. Combine such congruences with explicit bounds (e.g. lower bounds for gaps between consecutive squares) to rule out large $n$. 3. Extend computation further in $n$ (using fast integer square tests) to strengthen numerical evidence and possibly discover new patterns.

(iv) What a minimal counterexample would likely look like. A counterexample would be a smallest $n>7$ such that $n!+1$ is a perfect square. It would necessarily have $x$ odd and $x\equiv \pm 1\pmod{10}$, and would satisfy $x^2\equiv 1\pmod p$ for every prime $p\le n$.

Go to contribution →