{
  "id": "5238",
  "ident": "NS.05238",
  "slug": "oeis-206911",
  "title": "Position of $n$-th partial sum of the harmonic series when jointly ranked with $\\{\\log(k+1)\\}$",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "\"Conjecture: the difference sequence of A206911 consists of $2$s and $3$s.\"\n- _Clark Kimberling_, Feb 13 2012\n\nProved in the OEIS Open project, see T. Adamczewski, OEIS Open: How many conjectures can\nlanguage models turn into theorems?, [arXiv:2608.11941](https://arxiv.org/abs/2608.11941).",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA206911.conjecture_1",
  "statement_lean": "theorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : diff n = 2 ∨ diff n = 3",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Position of $n$-th partial sum of the harmonic series when jointly ranked with $\\{\\log(k+1)\\}$\n\nPosition of $n$-th partial sum of the harmonic series when all the partial sums are jointly ranked\nwith the set $\\{\\log(k+1)\\}$; complement of A206912.\n\n*References:*\n- [A206911](https://oeis.org/A206911)\n- T. Adamczewski, \"OEIS Open: How many conjectures can language models turn into theorems?\",\n  [arXiv:2608.11941](https://arxiv.org/abs/2608.11941) [cs.AI], 2026.\n-/\n\n@[expose] public section\n\nnamespace OeisA206911\n\n/-- Position of $n$-th partial sum of the harmonic series when all the partial sums are jointly\nranked with the set $\\{\\log(k+1)\\}$. -/\nnoncomputable def a (n : ℕ) : ℕ :=\n  n + (Int.floor (Real.exp (harmonic n : ℝ) - 1)).toNat\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 2 := by\n  have h : ⌊Real.exp 1 - 1⌋ = 1 := by\n    rw [Int.floor_eq_iff]\n    constructor <;> { norm_num; linarith [Real.exp_one_gt_d9, Real.exp_one_lt_d9] }\n  have hsum : (harmonic 1 : ℝ) = 1 := by norm_num [harmonic]\n  unfold a\n  rw [hsum, h]\n  rfl\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 5 := by\n  have hexp : (4 : ℝ) < Real.exp (3 / 2) ∧ Real.exp (3 / 2) < 5 := by\n    have hgt := Real.exp_one_gt_d9\n    have hlt := Real.exp_one_lt_d9\n    have hpos : 0 < Real.exp (3 / 2) := Real.exp_pos _\n    have hsq : (Real.exp (3 / 2)) ^ 2 = (Real.exp 1) ^ 3 := by\n      rw [← Real.exp_nat_mul, ← Real.exp_nat_mul]\n      ring_nf\n    constructor\n    · nlinarith [sq_nonneg (Real.exp 1 - 2.7182818283)]\n    · nlinarith [sq_nonneg (2.7182818286 - Real.exp 1)]\n  have h : ⌊Real.exp (3 / 2) - 1⌋ = 3 := by\n    rw [Int.floor_eq_iff]\n    constructor <;> { norm_num; linarith [hexp.1, hexp.2] }\n  have hsum : (harmonic 2 : ℝ) = 3 / 2 := by\n    norm_num [harmonic, Finset.sum_range_succ]\n  unfold a\n  rw [hsum, h]\n  rfl\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 8 := by\n  have hexp : (6 : ℝ) < Real.exp (11 / 6) ∧ Real.exp (11 / 6) < 7 := by\n    have hgt := Real.exp_one_gt_d9\n    have hlt := Real.exp_one_lt_d9\n    have hpos : 0 < Real.exp (11 / 6) := Real.exp_pos _\n    have hpow : (Real.exp (11 / 6)) ^ 6 = (Real.exp 1) ^ 11 := by\n      rw [← Real.exp_nat_mul, ← Real.exp_nat_mul]\n      ring_nf\n    constructor\n    · have : (6 : ℝ) ^ 6 < (Real.exp (11 / 6)) ^ 6 := by\n        rw [hpow]\n        calc (6 : ℝ) ^ 6 < 2.7182818283 ^ 11 := by norm_num\n          _ < (Real.exp 1) ^ 11 := by gcongr\n      exact lt_of_pow_lt_pow_left₀ 6 hpos.le this\n    · have : (Real.exp (11 / 6)) ^ 6 < (7 : ℝ) ^ 6 := by\n        rw [hpow]\n        calc (Real.exp 1) ^ 11 < 2.7182818286 ^ 11 := by gcongr\n          _ < (7 : ℝ) ^ 6 := by norm_num\n      exact lt_of_pow_lt_pow_left₀ 6 (by norm_num) this\n  have h : ⌊Real.exp (11 / 6) - 1⌋ = 5 := by\n    rw [Int.floor_eq_iff]\n    constructor <;> { norm_num; linarith [hexp.1, hexp.2] }\n  have hsum : (harmonic 3 : ℝ) = 11 / 6 := by\n    norm_num [harmonic, Finset.sum_range_succ]\n  unfold a\n  rw [hsum, h]\n  rfl\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 11 := by\n  have hexp : (8 : ℝ) < Real.exp (25 / 12) ∧ Real.exp (25 / 12) < 9 := by\n    have hgt := Real.exp_one_gt_d9\n    have hlt := Real.exp_one_lt_d9\n    have hpos : 0 < Real.exp (25 / 12) := Real.exp_pos _\n    have hpow : (Real.exp (25 / 12)) ^ 12 = (Real.exp 1) ^ 25 := by\n      rw [← Real.exp_nat_mul, ← Real.exp_nat_mul]\n      ring_nf\n    constructor\n    · have : (8 : ℝ) ^ 12 < (Real.exp (25 / 12)) ^ 12 := by\n        rw [hpow]\n        calc (8 : ℝ) ^ 12 < 2.7182818283 ^ 25 := by norm_num\n          _ < (Real.exp 1) ^ 25 := by gcongr\n      exact lt_of_pow_lt_pow_left₀ 12 hpos.le this\n    · have : (Real.exp (25 / 12)) ^ 12 < (9 : ℝ) ^ 12 := by\n        rw [hpow]\n        calc (Real.exp 1) ^ 25 < 2.7182818286 ^ 25 := by gcongr\n          _ < (9 : ℝ) ^ 12 := by norm_num\n      exact lt_of_pow_lt_pow_left₀ 12 (by norm_num) this\n  have h : ⌊Real.exp (25 / 12) - 1⌋ = 7 := by\n    rw [Int.floor_eq_iff]\n    constructor <;> { norm_num; linarith [hexp.1, hexp.2] }\n  have hsum : (harmonic 4 : ℝ) = 25 / 12 := by\n    norm_num [harmonic, Finset.sum_range_succ]\n  unfold a\n  rw [hsum, h]\n  rfl\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 13 := by\n  have hexp : (9 : ℝ) < Real.exp (137 / 60) ∧ Real.exp (137 / 60) < 10 := by\n    have hgt := Real.exp_one_gt_d9\n    have hlt := Real.exp_one_lt_d9\n    have hpos : 0 < Real.exp (137 / 60) := Real.exp_pos _\n    have hpow : (Real.exp (137 / 60)) ^ 60 = (Real.exp 1) ^ 137 := by\n      rw [← Real.exp_nat_mul, ← Real.exp_nat_mul]\n      ring_nf\n    constructor\n    · have : (9 : ℝ) ^ 60 < (Real.exp (137 / 60)) ^ 60 := by\n        rw [hpow]\n        calc (9 : ℝ) ^ 60 < 2.7182818283 ^ 137 := by norm_num\n          _ < (Real.exp 1) ^ 137 := by gcongr\n      exact lt_of_pow_lt_pow_left₀ 60 hpos.le this\n    · have : (Real.exp (137 / 60)) ^ 60 < (10 : ℝ) ^ 60 := by\n        rw [hpow]\n        calc (Real.exp 1) ^ 137 < 2.7182818286 ^ 137 := by gcongr\n          _ < (10 : ℝ) ^ 60 := by norm_num\n      exact lt_of_pow_lt_pow_left₀ 60 (by norm_num) this\n  have h : ⌊Real.exp (137 / 60) - 1⌋ = 8 := by\n    rw [Int.floor_eq_iff]\n    constructor <;> { norm_num; linarith [hexp.1, hexp.2] }\n  have hsum : (harmonic 5 : ℝ) = 137 / 60 := by\n    norm_num [harmonic, Finset.sum_range_succ]\n  unfold a\n  rw [hsum, h]\n  rfl\n\n/-- The difference sequence $d(n) = a(n+1) - a(n)$. -/\nnoncomputable def diff (n : ℕ) : ℤ :=\n  (a (n + 1) : ℤ) - (a n : ℤ)\n\n/-- The number of $3$s in the first $N$ terms of the difference sequence $d(1), \\dots, d(N)$. -/\nnoncomputable def count3 (N : ℕ) : ℕ :=\n  ∑ n ∈ Finset.range N, if diff (n + 1) = 3 then 1 else 0\n\n/-- The number of $2$s in the first $N$ terms of the difference sequence $d(1), \\dots, d(N)$. -/\nnoncomputable def count2 (N : ℕ) : ℕ :=\n  ∑ n ∈ Finset.range N, if diff (n + 1) = 2 then 1 else 0\n\n/--\n\"Conjecture: the difference sequence of A206911 consists of $2$s and $3$s.\"\n- _Clark Kimberling_, Feb 13 2012\n\nProved in the OEIS Open project, see T. Adamczewski, OEIS Open: How many conjectures can\nlanguage models turn into theorems?, [arXiv:2608.11941](https://arxiv.org/abs/2608.11941).\n-/\n@[category research solved, AMS 11]\ntheorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : diff n = 2 ∨ diff n = 3 := by\n  sorry\n\n/--\n\"Conjecture: the ratio (number of $3$s)/(number of $2$s) tends to a number between $3.5$ and $3.6$.\"\n- _Clark Kimberling_, Feb 13 2012\n\nProved in the OEIS Open project, see T. Adamczewski, OEIS Open: How many conjectures can\nlanguage models turn into theorems?, [arXiv:2608.11941](https://arxiv.org/abs/2608.11941).\n-/\n@[category research solved, AMS 11]\ntheorem conjecture_2 :\n    ∃ l : ℝ, 3.5 < l ∧ l < 3.6 ∧\n      Filter.Tendsto (fun N : ℕ => (count3 N : ℝ) / (count2 N : ℝ)) Filter.atTop (nhds l) := by\n  sorry\n\nend OeisA206911\n",
  "statement_hash": "fde025f71986628516d5917098b4b622a20d3cacfd8f6f5673d26a5bde94dea7",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}