/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil

Position of $n$-th partial sum of the harmonic series when jointly ranked with ${\log(k+1)}$

Position of $n$-th partial sum of the harmonic series when all the partial sums are jointly ranked with the set ${\log(k+1)}$; complement of A206912.

References:

    A206911

    T. Adamczewski, "OEIS Open: How many conjectures can language models turn into theorems?", arXiv:2608.11941 [cs.AI], 2026.

@[expose] public sectionnamespace OeisA206911

Position of $n$-th partial sum of the harmonic series when all the partial sums are jointly ranked with the set ${\log(k+1)}$.

noncomputable def a (n : ℕ) : ℕ := n + (Int.floor (Real.exp (harmonic n : ℝ) - 1)).toNath:⌊Real.exp 1 - 1⌋ = 1hsum:↑(harmonic 1) = 1⊢ 1 + Int.toNat 1 = 2 All goals completed! 🐙hexp:4 < Real.exp (3 / 2) ∧ Real.exp (3 / 2) < 5h:⌊Real.exp (3 / 2) - 1⌋ = 3hsum:↑(harmonic 2) = 3 / 2⊢ 2 + Int.toNat 3 = 5 All goals completed! 🐙hexp:6 < Real.exp (11 / 6) ∧ Real.exp (11 / 6) < 7h:⌊Real.exp (11 / 6) - 1⌋ = 5hsum:↑(harmonic 3) = 11 / 6⊢ 3 + Int.toNat 5 = 8 All goals completed! 🐙hexp:8 < Real.exp (25 / 12) ∧ Real.exp (25 / 12) < 9h:⌊Real.exp (25 / 12) - 1⌋ = 7hsum:↑(harmonic 4) = 25 / 12⊢ 4 + Int.toNat 7 = 11 All goals completed! 🐙hexp:9 < Real.exp (137 / 60) ∧ Real.exp (137 / 60) < 10h:⌊Real.exp (137 / 60) - 1⌋ = 8hsum:↑(harmonic 5) = 137 / 60⊢ 5 + Int.toNat 8 = 13 All goals completed! 🐙

The difference sequence $d(n) = a(n+1) - a(n)$.

noncomputable def diff (n : ℕ) : ℤ := (a (n + 1) : ℤ) - (a n : ℤ)

The number of $3$s in the first $N$ terms of the difference sequence $d(1), \dots, d(N)$.

noncomputable def count3 (N : ℕ) : ℕ := ∑ n ∈ Finset.range N, if diff (n + 1) = 3 then 1 else 0

The number of $2$s in the first $N$ terms of the difference sequence $d(1), \dots, d(N)$.

noncomputable def count2 (N : ℕ) : ℕ := ∑ n ∈ Finset.range N, if diff (n + 1) = 2 then 1 else 0

"Conjecture: the difference sequence of A206911 consists of $2$s and $3$s."

    Clark Kimberling, Feb 13 2012

Proved in the OEIS Open project, see T. Adamczewski, OEIS Open: How many conjectures can language models turn into theorems?, arXiv:2608.11941.

@[category research solved, AMS 11] theorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : diff n = 2 ∨ diff n = 3 := n:ℕhn:1 ≤ n⊢ diff n = 2 ∨ diff n = 3 All goals completed! 🐙

"Conjecture: the ratio (number of $3$s)/(number of $2$s) tends to a number between $3.5$ and $3.6$."

    Clark Kimberling, Feb 13 2012

Proved in the OEIS Open project, see T. Adamczewski, OEIS Open: How many conjectures can language models turn into theorems?, arXiv:2608.11941.

@[category research solved, AMS 11] theorem conjecture_2 : ∃ l : ℝ, 3.5 < l ∧ l < 3.6 ∧ Filter.Tendsto (fun N : ℕ => (count3 N : ℝ) / (count2 N : ℝ)) Filter.atTop (nhds l) := ⊢ ∃ l, 3.5 < l ∧ l < 3.6 ∧ Filter.Tendsto (fun N ↦ ↑(count3 N) / ↑(count2 N)) Filter.atTop (nhds l) All goals completed! 🐙end OeisA206911