{
  "id": "5031",
  "ident": "NS.05031",
  "slug": "oeis-167918",
  "title": "Smallest index $k > n$ such that $(p_k+p_{k+1})/(p_n+p_{n+1})$ is an integer $\\ge 2$",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Conjecture: the sequence is infinite, that is, for every $n \\geq 1$ there is some $k > n$\nwith $S(n) \\mid S(k)$, so that $a(n)$ is defined.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA167918.conjecture_infinite",
  "statement_lean": "theorem conjecture_infinite (n : ℕ) (hn : n > 0) : ∃ k > n, S n ∣ S k",
  "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# Smallest index $k > n$ such that $(p_k+p_{k+1})/(p_n+p_{n+1})$ is an integer $\\ge 2$\n\n*References:*\n- [A167918](https://oeis.org/A167918)-/\n\n@[expose] public section\n\nnamespace OeisA167918\n\n/-- $P(i)$ is the $i$-th prime, 1-indexed. -/\nnoncomputable def P (i : ℕ) : ℕ := Nat.nth Nat.Prime (i - 1)\n\n/-- $S(i) = p_i + p_{i+1}$. -/\nnoncomputable def S (i : ℕ) : ℕ := P i + P (i + 1)\n\n/-- Smallest index $k > n$ such that $S(n) \\mid S(k)$. -/\nnoncomputable def a (n : ℕ) : ℕ :=\n  if n = 0 then 0\n  else sInf { k : ℕ | k > n ∧ S n ∣ S k }\n\n/-- Value of the sequence `a` at 0. -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 0 := by rfl\n\n@[category API, AMS 11]\nlemma P_1 : P 1 = 2 := Nat.nth_prime_zero_eq_two\n\n@[category API, AMS 11]\nlemma P_2 : P 2 = 3 := Nat.nth_prime_one_eq_three\n\n@[category API, AMS 11]\nlemma P_3 : P 3 = 5 := Nat.nth_prime_two_eq_five\n\n@[category API, AMS 11]\nlemma P_4 : P 4 = 7 := Nat.nth_prime_three_eq_seven\n\n@[category API, AMS 11]\nlemma P_5 : P 5 = 11 := Nat.nth_prime_four_eq_eleven\n\n@[category API, AMS 11]\nlemma P_6 : P 6 = 13 := by\n  dsimp [P]\n  have h : (13 : ℕ).Prime := by decide\n  exact Nat.nth_count h\n\n@[category API, AMS 11]\nlemma P_7 : P 7 = 17 := by\n  dsimp [P]\n  have h : (17 : ℕ).Prime := by decide\n  exact Nat.nth_count h\n\n@[category API, AMS 11]\nlemma P_8 : P 8 = 19 := by\n  dsimp [P]\n  have h : (19 : ℕ).Prime := by decide\n  exact Nat.nth_count h\n\n@[category API, AMS 11]\nlemma S_1 : S 1 = 5 := by dsimp [S]; rw [P_1, P_2]\n\n@[category API, AMS 11]\nlemma S_2 : S 2 = 8 := by dsimp [S]; rw [P_2, P_3]\n\n@[category API, AMS 11]\nlemma S_3 : S 3 = 12 := by dsimp [S]; rw [P_3, P_4]\n\n@[category API, AMS 11]\nlemma S_4 : S 4 = 18 := by dsimp [S]; rw [P_4, P_5]\n\n@[category API, AMS 11]\nlemma S_5 : S 5 = 24 := by dsimp [S]; rw [P_5, P_6]\n\n@[category API, AMS 11]\nlemma S_6 : S 6 = 30 := by dsimp [S]; rw [P_6, P_7]\n\n@[category API, AMS 11]\nlemma S_7 : S 7 = 36 := by dsimp [S]; rw [P_7, P_8]\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 6 := by\n  have h_least : IsLeast { k : ℕ | k > 1 ∧ S 1 ∣ S k } 6 := by\n    constructor\n    · simp only [Set.mem_ofPred_eq]\n      refine ⟨by decide, ?_⟩\n      rw [S_1, S_6]\n      decide\n    · intro k hk\n      simp only [Set.mem_ofPred_eq] at hk\n      by_contra! h\n      have hk_gt := hk.1\n      interval_cases k\n      · have hdiv := hk.2\n        rw [S_1, S_2] at hdiv\n        revert hdiv; decide\n      · have hdiv := hk.2\n        rw [S_1, S_3] at hdiv\n        revert hdiv; decide\n      · have hdiv := hk.2\n        rw [S_1, S_4] at hdiv\n        revert hdiv; decide\n      · have hdiv := hk.2\n        rw [S_1, S_5] at hdiv\n        revert hdiv; decide\n  have ha1 : a 1 = sInf { k : ℕ | k > 1 ∧ S 1 ∣ S k } := by\n    unfold a; split <;> [omega; rfl]\n  rw [ha1, h_least.csInf_eq]\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 5 := by\n  have h_least : IsLeast { k : ℕ | k > 2 ∧ S 2 ∣ S k } 5 := by\n    constructor\n    · simp only [Set.mem_ofPred_eq]\n      refine ⟨by decide, ?_⟩\n      rw [S_2, S_5]\n      decide\n    · intro k hk\n      simp only [Set.mem_ofPred_eq] at hk\n      by_contra! h\n      have hk_gt := hk.1\n      interval_cases k\n      · have hdiv := hk.2\n        rw [S_2, S_3] at hdiv\n        revert hdiv; decide\n      · have hdiv := hk.2\n        rw [S_2, S_4] at hdiv\n        revert hdiv; decide\n  have ha2 : a 2 = sInf { k : ℕ | k > 2 ∧ S 2 ∣ S k } := by\n    unfold a; split <;> [omega; rfl]\n  rw [ha2, h_least.csInf_eq]\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 5 := by\n  have h_least : IsLeast { k : ℕ | k > 3 ∧ S 3 ∣ S k } 5 := by\n    constructor\n    · simp only [Set.mem_ofPred_eq]\n      refine ⟨by decide, ?_⟩\n      rw [S_3, S_5]\n      decide\n    · intro k hk\n      simp only [Set.mem_ofPred_eq] at hk\n      by_contra! h\n      have hk_gt := hk.1\n      interval_cases k\n      · have hdiv := hk.2\n        rw [S_3, S_4] at hdiv\n        revert hdiv; decide\n  have ha3 : a 3 = sInf { k : ℕ | k > 3 ∧ S 3 ∣ S k } := by\n    unfold a; split <;> [omega; rfl]\n  rw [ha3, h_least.csInf_eq]\n\n/-- Value of the sequence `a` at 4. -/\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 7 := by\n  have h_least : IsLeast { k : ℕ | k > 4 ∧ S 4 ∣ S k } 7 := by\n    constructor\n    · simp only [Set.mem_ofPred_eq]\n      refine ⟨by decide, ?_⟩\n      rw [S_4, S_7]\n      decide\n    · intro k hk\n      simp only [Set.mem_ofPred_eq] at hk\n      by_contra! h\n      have hk_gt := hk.1\n      interval_cases k\n      · have hdiv := hk.2\n        rw [S_4, S_5] at hdiv\n        revert hdiv; decide\n      · have hdiv := hk.2\n        rw [S_4, S_6] at hdiv\n        revert hdiv; decide\n  have ha4 : a 4 = sInf { k : ℕ | k > 4 ∧ S 4 ∣ S k } := by\n    unfold a; split <;> [omega; rfl]\n  rw [ha4, h_least.csInf_eq]\n\n/--\nConjecture: the sequence is infinite, that is, for every $n \\geq 1$ there is some $k > n$\nwith $S(n) \\mid S(k)$, so that $a(n)$ is defined.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_infinite (n : ℕ) (hn : n > 0) : ∃ k > n, S n ∣ S k := by\n  sorry\n\n/--\nConjecture: $f(n, k) = 2$ for infinitely many cases, where $k = a(n)$.\n\nNo hypothesis on the existence of $a(n)$ is needed: if no suitable $k > n$ exists then\n$a(n) = 0$ and $S(0) = 4 < 2 S(n)$, so such $n$ cannot be witnesses.\n-/\n@[category research open, AMS 11]\ntheorem conjecture1 (M : ℕ) :\n    ∃ n : ℕ, n ≥ M ∧ n > 0 ∧ S (a n) = 2 * S n := by\n  sorry\n\n/--\nOpen problem: is the ratio $f(n, k)$ bounded, where $k = a(n)$?\n\nNo hypothesis on the existence of $a(n)$ is needed: if no suitable $k > n$ exists then\n$a(n) = 0$ and $S(0) / S(n) = 4 / S(n) = 0$ for $n > 0$, so such $n$ do not affect boundedness.\nWhen $a(n) \\neq 0$ we have $S(n) \\mid S(a(n))$ by definition, so the division is exact.\n-/\n@[category research open, question, AMS 11]\ntheorem conjecture2 : ∃ C : ℕ, ∀ n : ℕ, n > 0 → S (a n) / S n ≤ C := by\n  sorry\n\n\nend OeisA167918\n",
  "statement_hash": "ccd5e091e13f6cbe4f958b8c0a3ede36b327e66b5946244196e88d03778fa5cf",
  "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."
}