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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Ways to write nn as the sum of three elements of {⌊T(x)/3⌋:x≥1}\{\lfloor T(x)/3 \rfloor : x \ge 1\} · a_2

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

No informal statement.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05943 [math.NT] · NS.05943v1 for this version
Declaration:OeisA256544.a_2
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:a86479c2e61dbaa7c1e21c52018cc33e992cd0719f150ba4ee5a0b9471ce2db4
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/256544.lean

Formal statement

theorem a_2 : a 2 = 2
Show the full Challenge.lean (73 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Ways to write $n$ as the sum of three elements of $\{\lfloor T(x)/3 \rfloor : x \ge 1\}$

The sequence $a(n)$ counts the number of ways to write $n$ as the sum of three unordered elements
of the set $\{\lfloor T(x)/3 \rfloor : x = 1, 2, 3, \dots\}$, where $T(x) = \frac{x(x+1)}{2}$ is
the $x$-th triangular number.

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

@[expose] public section

namespace OeisA256544

open Nat Finset

/-- The finite set of values $v \in \{\lfloor T(x)/3 \rfloor : x \ge 1\}$ with $v \le n$. -/
def aElements (n : ℕ) : Finset ℕ :=
  let maxRange : ℕ := 4 * n + 2
  ((range maxRange).image (fun x : ℕ => Nat.triangular x.succ / 3)).filter (fun v => v ≤ n)

/-- Number of ways to write $n$ as the sum of three unordered
elements of $\{\lfloor T(x)/3 \rfloor : x \ge 1\}$. -/
def a (n : ℕ) : ℕ :=
  let vs := aElements n
  ∑ a ∈ vs, ∑ b ∈ vs,
    (vs.filter (fun c => a ≤ b ∧ b ≤ c ∧ a + b + c = n)).card

@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by decide

@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by decide

@[category test, AMS 11]
theorem a_2 : a 2 = 2 := by decide

@[category test, AMS 11]
theorem a_3 : a 3 = 3 := by decide

@[category test, AMS 11]
theorem a_4 : a 4 = 3 := by decide

/-- Conjecture: For any positive integer $m$, every nonnegative integer $n$ can be written as
$\lfloor T(x)/m \rfloor + \lfloor T(y)/m \rfloor + \lfloor T(z)/m \rfloor$ with $x, y, z$
nonnegative integers. -/
@[category research open, AMS 11]
theorem conjecture (m : ℕ) (hm : 0 < m) (n : ℕ) :
    ∃ x y z : ℕ, n = Nat.triangular x / m + Nat.triangular y / m + Nat.triangular z / m := by
  sorry

end OeisA256544

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

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