Title:Sum of two squares and two central-binomial-type terms
Statement:Zhi-Wei Sun's Conjecture (A303639): any integer can be written as with nonnegative integers. Sun checked this for up to .
This is false: admits no such representation, so . Since , only are possible, and each of the resulting remainders is divisible by some prime to an odd power, hence is not a sum of two squares by Fermat's two-square theorem.
The counterexample is recorded as an approved comment on the OEIS entry; the Lean proof linked below formalises this argument, and was produced by Claude Opus 5 prompted by Sunsu Jeong (DCLXAI).
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | formal_proof |
| Cite as: | NS.06145 [math.NT] · NS.06145v1 for this version |
| Declaration: | OeisA303639.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | 215bbea78139ab601df492f7ed679de357bd310e68dc4d6dd9390c497bc5f843 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/303639.lean |
Formal statement
theorem conjecture : ¬ ∀ n : ℕ, 1 < n → A nShow the full Challenge.lean (107 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Sum of two squares and two central-binomial-type terms
A303639 counts the ways to write $n$ as $a^2 + b^2 + \binom{2c+1}{c} + \binom{2d+1}{d}$ with
$a, b, c, d$ nonnegative integers, $a \le b$ and $c \le d$.
*References:*
- [A303639](https://oeis.org/A303639)
- Z.-W. Sun, ["Restricted sums of four squares"](https://arxiv.org/abs/1701.05868),
arXiv:1701.05868 [math.NT], 2017-2018.
- Z.-W. Sun, ["Refining Lagrange's four-square theorem"](https://doi.org/10.1016/j.jnt.2016.11.008),
*J. Number Theory* **175** (2017), 167-190.
- S. Jeong, [A303639 Counterexample Project](https://github.com/DCLXAI/a303639-counterexample),
search, certificates and independent verifiers,
[DOI 10.5281/zenodo.21863025](https://doi.org/10.5281/zenodo.21863025). The counterexample is
recorded as an approved comment on the OEIS entry (Aug 10 2026).
-/
@[expose] public section
namespace OeisA303639
/-- The predicate that $n$ can be written as $a^2 + b^2 + \binom{2c+1}{c} + \binom{2d+1}{d}$
for nonnegative integers $a, b, c, d$.
This drops the normalisations $a \le b$ and $c \le d$. They do not affect whether the count is
positive, and refuting the unordered statement is the stronger result, since a representation
with $a \le b$ and $c \le d$ is in particular a representation. -/
def A (n : ℕ) : Prop :=
∃ a b c d : ℕ, n = a ^ 2 + b ^ 2 + (2 * c + 1).choose c + (2 * d + 1).choose d
@[category test, AMS 11]
theorem a_1 : ¬ A 1 := by
rintro ⟨a, b, c, d, h⟩
have hc : 0 < (2 * c + 1).choose c := Nat.choose_pos (by omega)
have hd : 0 < (2 * d + 1).choose d := Nat.choose_pos (by omega)
omega
@[category test, AMS 11]
theorem a_2 : A 2 :=
⟨0, 0, 0, 0, by decide⟩
@[category test, AMS 11]
theorem a_3 : A 3 :=
⟨1, 0, 0, 0, by decide⟩
@[category test, AMS 11]
theorem a_4 : A 4 :=
⟨0, 0, 0, 1, by decide⟩
@[category test, AMS 11]
theorem a_5 : A 5 :=
⟨1, 0, 0, 1, by decide⟩
@[category test, AMS 11]
theorem a_6 : A 6 :=
⟨2, 0, 0, 0, by decide⟩
set_option linter.style.formal_proof_palomar false in
/--
**Zhi-Wei Sun's Conjecture (A303639)**: any integer $n > 1$ can be written as
$a^2 + b^2 + \binom{2c+1}{c} + \binom{2d+1}{d}$ with $a, b, c, d$ nonnegative integers.
Sun checked this for $n$ up to $6 \cdot 10^8$.
This is false: $n = 800322180$ admits no such representation, so $a(800322180) = 0$. Since
$\binom{33}{16} > 800322180$, only $c, d \le 15$ are possible, and each of the resulting $136$
remainders $800322180 - \binom{2c+1}{c} - \binom{2d+1}{d}$ is divisible by some prime
$p \equiv 3 \pmod 4$ to an odd power, hence is not a sum of two squares by Fermat's two-square
theorem.
The counterexample is recorded as an approved comment on the OEIS entry; the Lean proof linked
below formalises this argument, and was produced by Claude Opus 5 prompted by Sunsu Jeong
([DCLXAI](https://github.com/DCLXAI)).
-/
@[category research solved, AMS 11,
formal_proof using lean4 at "https://github.com/DCLXAI/a303639-counterexample/blob/8e21c57c622b05a1815bcf9927458ebb3973ef2e/lean/A303639/Counterexample.lean"]
theorem conjecture : ¬ ∀ n : ℕ, 1 < n → A n := by
sorry
set_option linter.style.formal_proof_palomar false in
/-- The counterexample witnessing that A303639 vanishes: $a(800322180) = 0$. -/
@[category research solved, AMS 11,
formal_proof using lean4 at "https://github.com/DCLXAI/a303639-counterexample/blob/8e21c57c622b05a1815bcf9927458ebb3973ef2e/lean/A303639/Counterexample.lean"]
theorem conjecture.counterexample : ¬ A 800322180 := by
sorry
end OeisA303639
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA303639.conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch oeis-303639 nosorry submit oeis-303639 nosorry/oeis-303639/Solution.lean --wait
Formal variants
Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.
- conjecture-counterexample — known result
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.