FormalConjectures/OEIS/243106.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

7 declarations, 1 contain sorry, 0 declared as axioms

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:

Imports (1)
  1. def OeisA243106.a 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 line 48 source

    Source documentation

    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.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Int

    Proof uses: Finset.sum, Finset.Icc, OfNat.ofNat, HMul.hMul, ite, Nat.Prime, Neg.neg, HPow.hPow

    13 instances, coercions and auxiliary constants left out.

    def a (n : ℕ) : Int :=
    …
  2. lemma OeisA243106.a_1 line 54 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Int, OeisA243106.a, OfNat.ofNat, Nat

    Proof uses: Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  3. lemma OeisA243106.a_2 line 57 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Int, OeisA243106.a, OfNat.ofNat, Nat, Neg.neg

    Proof uses: Eq.refl

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  4. lemma OeisA243106.a_3 line 60 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Int, OeisA243106.a, OfNat.ofNat, Nat, Neg.neg

    Proof uses: Eq.refl

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  5. lemma OeisA243106.a_4 line 63 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Int, OeisA243106.a, OfNat.ofNat, Nat

    Proof uses: Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  6. lemma OeisA243106.a_5 line 66 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Int, OeisA243106.a, OfNat.ofNat, Nat, Neg.neg

    Proof uses: Eq.refl

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  7. theorem OeisA243106.digits_sum_restricted sorry line 77 source

    depends on sorry what this means

    Statement uses: Nat, GE.ge, OfNat.ofNat, Int, Membership.mem, Finset, Finset.Icc, Or, Eq, Neg.neg, Finset.sum, HMul.hMul, HPow.hPow, List, Nat.digits, Int.natAbs, HSub.hSub

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    40 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.