Title:Conjectures associated with A102371
Statement:Do we have for ?
Note: The OEIS comment suggests which means this applies at least for , as we assume is defined on . We include the case which relies on , which is 0.
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | question, formal_proof |
| Cite as: | NS.04456 [math.NT] · NS.04456v1 for this version |
| Declaration: | OeisA102371.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | 0ece77770819d5c49b79fb736cd4eb7effe52bb6a1f9ffd9354dab782a8b63f0 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/102371.lean |
Formal statement
theorem conjecture : ∀ n : ℕ, 0 < n → a n = 2^n - 1 - OeisA105033.a (n - 1)Show the full Challenge.lean (81 lines) — definitions included
module
public import FormalConjecturesUtil
public import FormalConjectures.OEIS.«105033»
/-!
# Conjectures associated with A102371
The sequence $a(n)$ is defined by the recurrence relation $a(1)=1$,
and for $n>1$, $a(n) = a(n-1) \operatorname{XOR} (a(n-1) + n)$.
The conjecture asks if $a(n) = 2^n - 1 - \operatorname{A105033}(n-1)$ for $n \ge 1$.
*References:*
- [A102371](https://oeis.org/A102371)
-/
@[expose] public section
namespace OeisA102371
open Nat
open Int
/-- The primary defining sequence `a`.
$a(n)$ is defined by the recurrence relation $a(1)=1$, and for $n>1$,
$a(n) = a(n-1) \operatorname{XOR} (a(n-1) + n)$,
where $\operatorname{XOR}$ is the bitwise exclusive-or operator (`^^^`). -/
def a : ℕ → ℕ
| 0 => 0
| 1 => 1
| (n' + 2) =>
let anMinus1 := a (n' + 1)
anMinus1 ^^^ (anMinus1 + (n' + 2))
/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/
@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by rfl
@[category test, AMS 11]
theorem a_2 : a 2 = 2 := by rfl
@[category test, AMS 11]
theorem a_3 : a 3 = 7 := by rfl
@[category test, AMS 11]
theorem a_4 : a 4 = 12 := by rfl
@[category test, AMS 11]
theorem a_5 : a 5 = 29 := by rfl
set_option linter.style.formal_proof_palomar false in
/--
Do we have $a(n) = 2^n - 1 - \operatorname{A105033}(n-1)$ for $n \ge 1$?
Note: The OEIS comment suggests $n-1$ which means this applies at least for $n \ge 1$,
as we assume $\operatorname{A105033}(\mathbb{N})$ is defined on $\mathbb{N}$.
We include the case $n=1$ which relies on $A105033(0)$, which is 0.
-/
@[category research solved, question, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/oeis-a102371/blob/d80fba9/lean/OeisA102371FC.lean#L490-L497"]
theorem conjecture : ∀ n : ℕ, 0 < n → a n = 2^n - 1 - OeisA105033.a (n - 1) := by
sorry
end OeisA102371
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA102371.conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch oeis-102371 nosorry submit oeis-102371 nosorry/oeis-102371/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.