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 · a_3

Source:OEIS conjectures
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Statement:

Value of the sequence a at 3.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05832 [math.NT] · NS.05832v1 for this version
Declaration:OeisA2426.a_3
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
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 a_3 : a 3 = 7
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.a_3 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_a_3 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk oeis-2426--a-3      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch oeis-2426--a-3
nosorry submit oeis-2426--a-3 nosorry/oeis-2426--a-3/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.