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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Number of Abelian cubes of length 3n3n over an alphabet of size 3

Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Conjecture: the supercongruences a(n⋅pk)≡a(n⋅pk−1)(modp3k)a(n \cdot p^k) \equiv a(n \cdot p^{k-1}) \pmod{p^{3k}} hold for primes p≥5p \ge 5 and positive integers nn and kk.

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:formal_proof
Cite as:NS.04940 [math.NT] · NS.04940v1 for this version
Declaration:OeisA141057.conjecture1
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:c5db401b1b3e0d86b3987b9ba5b9c581d002d46462c9c9490bc3816691ec16e5
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/141057.lean

Formal statement

theorem conjecture1 (p k n : ℕ) (hp : p.Prime) (h_p_ge_5 : 5 ≤ p) (h_k_pos : 1 ≤ k)
    (h_n_pos : 1 ≤ n) :
    (a (n * p ^ k) : ℤ) ≡ a (n * p ^ (k - 1)) [ZMOD (p ^ (3 * k))]
Show the full Challenge.lean (108 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Number of Abelian cubes of length $3n$ over an alphabet of size 3

An Abelian cube is a string of the form $x x' x''$ with $|x| = |x'| = |x''|$ and $x$ is a
permutation of $x'$ and $x''$. The number of Abelian cubes of length $3n$ over an alphabet of
size 3 is given by
$$a(n) = \sum_{k=0}^n \binom{n}{k}^3 \sum_{j=0}^k \binom{k}{j}^3.$$

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

@[expose] public section

namespace OeisA141057

/-- Number of Abelian cubes of length $3n$ over an alphabet of size 3. -/
def a (n : ℕ) : ℕ :=
  ∑ k ∈ Finset.range (n + 1), (n.choose k ^ 3) * ∑ j ∈ Finset.range (k + 1), (k.choose j ^ 3)

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

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

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

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

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

set_option linter.style.formal_proof_palomar false in
/--
Conjecture: the supercongruences $a(n \cdot p^k) \equiv a(n \cdot p^{k-1}) \pmod{p^{3k}}$ hold
for primes $p \ge 5$ and positive integers $n$ and $k$.-/
@[category research solved, AMS 11,
  formal_proof using lean4 at "https://github.com/epoch-research/LeanOpenProblems-results/blob/f02efd9a8c5fc6a735d2a90c33e24f7278ce0ffc/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/oeis_a141057_supercongruence_conjecture/Submission/Spec.lean#L955"]
theorem conjecture1 (p k n : ℕ) (hp : p.Prime) (h_p_ge_5 : 5 ≤ p) (h_k_pos : 1 ≤ k)
    (h_n_pos : 1 ≤ n) :
    (a (n * p ^ k) : ℤ) ≡ a (n * p ^ (k - 1)) [ZMOD (p ^ (3 * k))] := by
  sorry

/-- Extension of the sequence $a$ to all integers $n \in \mathbb{Z}$.
For $n < 0$, $a(n) = \sum_{k=0}^{-n} \binom{n}{k}^3 \sum_{j=0}^k \binom{k}{j}^3$,
where $\binom{n}{k} = (-1)^k \binom{-n+k-1}{k}$. -/
def aInt (n : ℤ) : ℤ :=
  if 0 ≤ n then
    let nNat := n.toNat
    (∑ k ∈ Finset.range (nNat + 1), (nNat.choose k ^ 3) * ∑ j ∈ Finset.range (k + 1), (k.choose j ^ 3) : ℕ)
  else
    let nNat := (-n).toNat
    ∑ k ∈ Finset.range (nNat + 1), ((-1 : ℤ) ^ k * (nNat + k - 1).choose k : ℤ) ^ 3 *
      ∑ j ∈ Finset.range (k + 1), ((k.choose j : ℤ) ^ 3)

/-- Value of the sequence `aInt` at -1. -/
@[category test, AMS 11]
theorem aInt_neg_1 : aInt (-1) = -1 := by decide

/-- Value of the sequence `aInt` at -2. -/
@[category test, AMS 11]
theorem aInt_neg_2 : aInt (-2) = 255 := by decide

set_option linter.style.formal_proof_palomar false in
/--
Conjecture (Peter Bala, 2022):
The supercongruences $a(n \cdot p^k) \equiv a(n \cdot p^{k-1}) \pmod{p^{3k}}$ hold
for the integer-indexed extension $a(n)$ for all $n \in \mathbb{Z} \setminus \{0\}$, primes $p \ge 5$,
and $k \ge 1$.

Proved in Lean by Jensen Kohlmeyer and Liam Kruer, extending the positive-index
proof by Epoch Research.
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at "https://github.com/JENW1N/complete-math-solutions/blob/8b9db1d8c0ded5398d5e4e4bbdf8f2ec14ce5c23/proofs/BalaA141057Conjecture.lean#L1416"]
theorem conjecture2 (p k : ℕ) (n : ℤ) (hp : p.Prime) (h_p_ge_5 : 5 ≤ p) (h_k_pos : 1 ≤ k)
    (hn : n ≠ 0) :
    aInt (n * (p ^ k : ℤ)) ≡ aInt (n * (p ^ (k - 1) : ℤ)) [ZMOD (p ^ (3 * k) : ℤ)] := by
  sorry

end OeisA141057

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA141057.conjecture1 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture1 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch oeis-141057
nosorry submit oeis-141057 nosorry/oeis-141057/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.