Title:Van Eck's sequence (OEIS A181391)
Statement:OEIS A181391 conjectures: "every number eventually appears."
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.05086 [math.NT] · NS.05086v1 for this version |
| Declaration: | OeisA181391.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | 4bd3b980114f9273aaffdda3aa49e50b9da6c9aa6603df3746905e42f7332b92 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/181391.lean |
Formal statement
theorem conjecture : Function.Surjective aShow the full Challenge.lean (113 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Van Eck's sequence (OEIS A181391)
Van Eck's sequence starts with zero. If the current value has occurred before, the next value is
the distance to its most recent earlier occurrence; otherwise the next value is zero.
*References:*
- [OEIS A181391](https://oeis.org/A181391)
- N. J. A. Sloane, [Some Open Problems](https://neilsloane.com/doc/EMMay2016.pdf#page=14)
-/
@[expose] public section
namespace OeisA181391
/-- The state used to generate Van Eck's sequence at a given index. The map `lastSeen` records
the most recent occurrence strictly before the current index. -/
structure State where
current : ℕ
lastSeen : ℕ → Option ℕ
/-- Advance the sequence from index `n`, recording the old current value only after computing the
next value. -/
def step (n : ℕ) (s : State) : State :=
{ current := match s.lastSeen s.current with
| some j => n - j
| none => 0
lastSeen := Function.update s.lastSeen s.current (some n) }
/-- The state of Van Eck's sequence at index `n`. -/
def state : ℕ → State
| 0 => ⟨0, fun _ ↦ none⟩
| n + 1 => step n (state n)
/-- Van Eck's sequence, indexed from zero. -/
def a (n : ℕ) : ℕ :=
(state n).current
/-- The public sequence satisfies the state transition used in its definition. -/
@[category API, AMS 11]
theorem a_succ (n : ℕ) :
a (n + 1) = match (state n).lastSeen (a n) with
| some j => n - j
| none => 0 := by
rfl
@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by
rfl
@[category test, AMS 11]
theorem a_1 : a 1 = 0 := by
rfl
@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by
rfl
@[category test, AMS 11]
theorem a_3 : a 3 = 0 := by
rfl
@[category test, AMS 11]
theorem a_4 : a 4 = 2 := by
rfl
@[category test, AMS 11]
theorem a_5 : a 5 = 0 := by
rfl
@[category test, AMS 11]
theorem a_6 : a 6 = 2 := by
rfl
@[category test, AMS 11]
theorem a_7 : a 7 = 2 := by
rfl
@[category test, AMS 11]
theorem a_8 : a 8 = 1 := by
rfl
@[category test, AMS 11]
theorem a_9 : a 9 = 6 := by
rfl
/-- [OEIS A181391](https://oeis.org/A181391) conjectures: "every number eventually appears." -/
@[category research open, AMS 11]
theorem conjecture : Function.Surjective a := by
sorry
end OeisA181391
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA181391.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-181391 nosorry submit oeis-181391 nosorry/oeis-181391/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.