Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Central trinomial coefficients

Source:OEIS conjectures
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

An integer n>3n > 3 is prime if and only if a(n)≡1(modn2)a(n) \equiv 1 \pmod{n^2}. We have verified this for nn up to 8⋅1058 \cdot 10^5, and proved that a(p)≡1(modp2)a(p) \equiv 1 \pmod{p^2} for any prime p>3p > 3 (cf. A277640).

  • Zhi-Wei Sun, Nov 30 2016
Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05834 [math.NT] · NS.05834v1 for this version
Declaration:OeisA2426.conjecture
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:afb1ea04e6ef35c68cd2574df42fdbc5941511df7111cfed138844d5ef47174e
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/2426.lean

Formal statement

theorem conjecture (n : ℕ) (hn : 3 < n) :
    n.Prime ↔ a n ≡ 1 [MOD n ^ 2]
Show the full Challenge.lean (69 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Central trinomial coefficients

Central trinomial coefficients: largest coefficient of $(1 + x + x^2)^n$, which is the coefficient
of $x^n$ in the expansion of $(1 + x + x^2)^n$.

*References:*
- [A002426](https://oeis.org/A002426)-/

@[expose] public section

namespace OeisA2426

/-- Central trinomial coefficients:
$a(n) = \sum_{k=0}^{\lfloor n/2 \rfloor} \binom{n}{2k} \binom{2k}{k}$. -/
def a (n : ℕ) : ℕ :=
  ∑ k ∈ Finset.range (n / 2 + 1), n.choose (2 * k) * (2 * k).choose k

/-- Value of the sequence `a` at 0. -/
@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by rfl

/-- Value of the sequence `a` at 1. -/
@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by rfl

/-- Value of the sequence `a` at 2. -/
@[category test, AMS 11]
theorem a_2 : a 2 = 3 := by rfl

/-- Value of the sequence `a` at 3. -/
@[category test, AMS 11]
theorem a_3 : a 3 = 7 := by rfl

/-- Value of the sequence `a` at 4. -/
@[category test, AMS 11]
theorem a_4 : a 4 = 19 := by rfl

/--
An integer $n > 3$ is prime if and only if $a(n) \equiv 1 \pmod{n^2}$.
We have verified this for $n$ up to $8 \cdot 10^5$, and proved that $a(p) \equiv 1 \pmod{p^2}$
for any prime $p > 3$ (cf. A277640).
- Zhi-Wei Sun, Nov 30 2016-/
@[category research open, AMS 11]
theorem conjecture (n : ℕ) (hn : 3 < n) :
    n.Prime ↔ a n ≡ 1 [MOD n ^ 2] := by
  sorry

end OeisA2426

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA2426.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-2426
nosorry submit oeis-2426 nosorry/oeis-2426/Solution.lean --wait

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.