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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Symmetry of digit sum differences sign⁡(S5(k)−S1(k))\operatorname{sign}(S_5(k) - S_1(k)) · 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.06123 [math.NT] · NS.06123v1 for this version
Declaration:OeisA289411.a_2
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:e37c50b2638e1ae286f38b2a9ff52cb79131cef9561a1c95030fff8ca4a81c7a
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/289411.lean

Formal statement

lemma a_2 : a 2 = 0
Show the full Challenge.lean (85 lines) — definitions included
module

public import FormalConjecturesUtil


/-!
# Symmetry of digit sum differences $\operatorname{sign}(S_5(k) - S_1(k))$

a: $\mathrm{a}(n) = \sum_{k=0}^n \mathrm{sign}(\mathrm{A007953}(5k) - \mathrm{A007953}(k))$.
$\mathrm{A007953}(n)$ is the digital sum of $n$ in base 10.
The sequence is non-negative, so the sum over $\mathbb{Z}$ is converted to $\mathbb{N}$.

*References:*
- [A289411](https://oeis.org/A289411)
- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.
- [A007953](https://oeis.org/A007953)
-/

@[expose] public section

namespace OeisA289411


open Nat

/--
a: $\mathrm{a}(n) = \sum_{k=0}^n \mathrm{sign}(\mathrm{A007953}(5k) - \mathrm{A007953}(k))$.
$\mathrm{A007953}(n)$ is the digital sum of $n$ in base 10.
The sequence is non-negative, so the sum over $\mathbb{Z}$ is converted to $\mathbb{N}$.
-/
def a (n : ℕ) : ℕ :=
  let digital_sum_ten (m : ℕ) : ℕ := (Nat.digits 10 m).sum
  (Finset.range (n + 1)).sum (fun k =>
    Int.sign ((digital_sum_ten (5 * k) : ℤ) - (digital_sum_ten k : ℤ)))
  |>.toNat



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

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

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

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

@[category test, AMS 11]
lemma a_4 : a 4 = 0 := by decide


set_option linter.style.formal_proof_palomar false in
/--
Conjecture: For $k \ge 1$, let $m_k = 10^k / 2 - 1$. Then for $i = 0, \ldots, m_k$, we have $a(m_k - i) = a(m_k + i)$.

A formal proof has been found with the methods described in
[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).
-/
@[category research solved, AMS 11, formal_proof using formal_conjectures at
"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/289411.wip.lean#L167"]
theorem a_symm (k : ℕ) (hk : 0 < k) :
    let m_k : ℕ := (10 ^ k) / 2 - 1
    ∀ i : ℕ, i ≤ m_k → a (m_k - i) = a (m_k + i) := by
    sorry

end OeisA289411

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA289411.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-289411--a-2      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch oeis-289411--a-2
nosorry submit oeis-289411--a-2 nosorry/oeis-289411--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.