Title:Signed digit sums in bases
Statement:Conjecture: When expressed in base , the absolute value of any partial sum only contains digits belonging to .
A formal proof has been found with the methods described in arxiv/2605.22763.
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | formal_proof |
| Cite as: | NS.05851 [math.NT] · NS.05851v1 for this version |
| Declaration: | OeisA243106.digits_sum_restricted |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | c93590e5a3841078ae75eb839d519a03427486449c647bed346b61f7e173ee13 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/243106.lean |
Formal statement
theorem digits_sum_restricted (b n : ℕ) (hb : b ≥ 5) :
∀ (σ : ℕ → Int) (hσ : ∀ k ∈ Icc 1 n, σ k = 1 ∨ σ k = -1),
let x : Int := (Icc 1 n).sum fun k ↦ σ k * (b : Int) ^ k;
∀ d ∈ (b.digits x.natAbs), d = 0 ∨ d = 1 ∨ d = b - 2 ∨ d = b - 1Show the full Challenge.lean (85 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Signed digit sums in bases $b \ge 5$
The sequence is defined by
$$a(n) = \sum_{k=1}^n (-1)^{\operatorname{isprime}(k)} 10^k$$
where the sign is $-1$ if $k$ is prime, and $1$ if $k$ is not prime.
Generalizing the digit pattern observed in $a(n)$, it was conjectured on the OEIS entry that
for any base $b \ge 5$ and any choice of signs $\pm 1$, the absolute value of $\sum_{k=1}^n \pm b^k$
only contains digits in $\{0, 1, b-2, b-1\}$.
*References:*
- [A243106](https://oeis.org/A243106)
- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.
-/
@[expose] public section
namespace OeisA243106
open Finset
/--
The sequence
$$a(n) = \sum_{k=1}^n (-1)^{\operatorname{isprime}(k)} 10^k$$
where the sign is $-1$ if $k$ is prime, and $1$ if $k$ is not prime.
-/
def a (n : ℕ) : Int :=
(Icc 1 n).sum fun k : ℕ =>
(if Nat.Prime k then (-1 : Int) else 1) * (10 : Int) ^ k
@[category test, AMS 11]
lemma a_1 : a 1 = 10 := by rfl
@[category test, AMS 11]
lemma a_2 : a 2 = -90 := by rfl
@[category test, AMS 11]
lemma a_3 : a 3 = -1090 := by rfl
@[category test, AMS 11]
lemma a_4 : a 4 = 8910 := by rfl
@[category test, AMS 11]
lemma a_5 : a 5 = -91090 := by rfl
set_option linter.style.formal_proof_palomar false in
/--
Conjecture: When expressed in base $b \ge 5$, the absolute value of any partial sum $\sum \pm b^k$ only contains digits belonging to $\{0, 1, b-2, b-1\}$.
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/243106.wip.lean#L140"]
theorem digits_sum_restricted (b n : ℕ) (hb : b ≥ 5) :
∀ (σ : ℕ → Int) (hσ : ∀ k ∈ Icc 1 n, σ k = 1 ∨ σ k = -1),
let x : Int := (Icc 1 n).sum fun k ↦ σ k * (b : Int) ^ k;
∀ d ∈ (b.digits x.natAbs), d = 0 ∨ d = 1 ∨ d = b - 2 ∨ d = b - 1 := by
sorry
end OeisA243106
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA243106.digits_sum_restricted with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_digits_sum_restricted : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch oeis-243106 nosorry submit oeis-243106 nosorry/oeis-243106/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.