Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Smallest index k>nk > n such that (pk+pk+1)/(pn+pn+1)(p_k+p_{k+1})/(p_n+p_{n+1}) is an integer ≥2\ge 2

Source:OEIS conjectures
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Conjecture: the sequence is infinite, that is, for every n≥1n \geq 1 there is some k>nk > n with S(n)∣S(k)S(n) \mid S(k), so that a(n)a(n) is defined.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05031 [math.NT] · NS.05031v1 for this version
Declaration:OeisA167918.conjecture_infinite
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:ccd5e091e13f6cbe4f958b8c0a3ede36b327e66b5946244196e88d03778fa5cf
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/167918.lean

Formal statement

theorem conjecture_infinite (n : ℕ) (hn : n > 0) : ∃ k > n, S n ∣ S k
Show the full Challenge.lean (230 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Smallest index $k > n$ such that $(p_k+p_{k+1})/(p_n+p_{n+1})$ is an integer $\ge 2$

*References:*
- [A167918](https://oeis.org/A167918)-/

@[expose] public section

namespace OeisA167918

/-- $P(i)$ is the $i$-th prime, 1-indexed. -/
noncomputable def P (i : ℕ) : ℕ := Nat.nth Nat.Prime (i - 1)

/-- $S(i) = p_i + p_{i+1}$. -/
noncomputable def S (i : ℕ) : ℕ := P i + P (i + 1)

/-- Smallest index $k > n$ such that $S(n) \mid S(k)$. -/
noncomputable def a (n : ℕ) : ℕ :=
  if n = 0 then 0
  else sInf { k : ℕ | k > n ∧ S n ∣ S k }

/-- Value of the sequence `a` at 0. -/
@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by rfl

@[category API, AMS 11]
lemma P_1 : P 1 = 2 := Nat.nth_prime_zero_eq_two

@[category API, AMS 11]
lemma P_2 : P 2 = 3 := Nat.nth_prime_one_eq_three

@[category API, AMS 11]
lemma P_3 : P 3 = 5 := Nat.nth_prime_two_eq_five

@[category API, AMS 11]
lemma P_4 : P 4 = 7 := Nat.nth_prime_three_eq_seven

@[category API, AMS 11]
lemma P_5 : P 5 = 11 := Nat.nth_prime_four_eq_eleven

@[category API, AMS 11]
lemma P_6 : P 6 = 13 := by
  dsimp [P]
  have h : (13 : ℕ).Prime := by decide
  exact Nat.nth_count h

@[category API, AMS 11]
lemma P_7 : P 7 = 17 := by
  dsimp [P]
  have h : (17 : ℕ).Prime := by decide
  exact Nat.nth_count h

@[category API, AMS 11]
lemma P_8 : P 8 = 19 := by
  dsimp [P]
  have h : (19 : ℕ).Prime := by decide
  exact Nat.nth_count h

@[category API, AMS 11]
lemma S_1 : S 1 = 5 := by dsimp [S]; rw [P_1, P_2]

@[category API, AMS 11]
lemma S_2 : S 2 = 8 := by dsimp [S]; rw [P_2, P_3]

@[category API, AMS 11]
lemma S_3 : S 3 = 12 := by dsimp [S]; rw [P_3, P_4]

@[category API, AMS 11]
lemma S_4 : S 4 = 18 := by dsimp [S]; rw [P_4, P_5]

@[category API, AMS 11]
lemma S_5 : S 5 = 24 := by dsimp [S]; rw [P_5, P_6]

@[category API, AMS 11]
lemma S_6 : S 6 = 30 := by dsimp [S]; rw [P_6, P_7]

@[category API, AMS 11]
lemma S_7 : S 7 = 36 := by dsimp [S]; rw [P_7, P_8]

/-- Value of the sequence `a` at 1. -/
@[category test, AMS 11]
theorem a_1 : a 1 = 6 := by
  have h_least : IsLeast { k : ℕ | k > 1 ∧ S 1 ∣ S k } 6 := by
    constructor
    · simp only [Set.mem_ofPred_eq]
      refine ⟨by decide, ?_⟩
      rw [S_1, S_6]
      decide
    · intro k hk
      simp only [Set.mem_ofPred_eq] at hk
      by_contra! h
      have hk_gt := hk.1
      interval_cases k
      · have hdiv := hk.2
        rw [S_1, S_2] at hdiv
        revert hdiv; decide
      · have hdiv := hk.2
        rw [S_1, S_3] at hdiv
        revert hdiv; decide
      · have hdiv := hk.2
        rw [S_1, S_4] at hdiv
        revert hdiv; decide
      · have hdiv := hk.2
        rw [S_1, S_5] at hdiv
        revert hdiv; decide
  have ha1 : a 1 = sInf { k : ℕ | k > 1 ∧ S 1 ∣ S k } := by
    unfold a; split <;> [omega; rfl]
  rw [ha1, h_least.csInf_eq]

/-- Value of the sequence `a` at 2. -/
@[category test, AMS 11]
theorem a_2 : a 2 = 5 := by
  have h_least : IsLeast { k : ℕ | k > 2 ∧ S 2 ∣ S k } 5 := by
    constructor
    · simp only [Set.mem_ofPred_eq]
      refine ⟨by decide, ?_⟩
      rw [S_2, S_5]
      decide
    · intro k hk
      simp only [Set.mem_ofPred_eq] at hk
      by_contra! h
      have hk_gt := hk.1
      interval_cases k
      · have hdiv := hk.2
        rw [S_2, S_3] at hdiv
        revert hdiv; decide
      · have hdiv := hk.2
        rw [S_2, S_4] at hdiv
        revert hdiv; decide
  have ha2 : a 2 = sInf { k : ℕ | k > 2 ∧ S 2 ∣ S k } := by
    unfold a; split <;> [omega; rfl]
  rw [ha2, h_least.csInf_eq]

/-- Value of the sequence `a` at 3. -/
@[category test, AMS 11]
theorem a_3 : a 3 = 5 := by
  have h_least : IsLeast { k : ℕ | k > 3 ∧ S 3 ∣ S k } 5 := by
    constructor
    · simp only [Set.mem_ofPred_eq]
      refine ⟨by decide, ?_⟩
      rw [S_3, S_5]
      decide
    · intro k hk
      simp only [Set.mem_ofPred_eq] at hk
      by_contra! h
      have hk_gt := hk.1
      interval_cases k
      · have hdiv := hk.2
        rw [S_3, S_4] at hdiv
        revert hdiv; decide
  have ha3 : a 3 = sInf { k : ℕ | k > 3 ∧ S 3 ∣ S k } := by
    unfold a; split <;> [omega; rfl]
  rw [ha3, h_least.csInf_eq]

/-- Value of the sequence `a` at 4. -/
@[category test, AMS 11]
theorem a_4 : a 4 = 7 := by
  have h_least : IsLeast { k : ℕ | k > 4 ∧ S 4 ∣ S k } 7 := by
    constructor
    · simp only [Set.mem_ofPred_eq]
      refine ⟨by decide, ?_⟩
      rw [S_4, S_7]
      decide
    · intro k hk
      simp only [Set.mem_ofPred_eq] at hk
      by_contra! h
      have hk_gt := hk.1
      interval_cases k
      · have hdiv := hk.2
        rw [S_4, S_5] at hdiv
        revert hdiv; decide
      · have hdiv := hk.2
        rw [S_4, S_6] at hdiv
        revert hdiv; decide
  have ha4 : a 4 = sInf { k : ℕ | k > 4 ∧ S 4 ∣ S k } := by
    unfold a; split <;> [omega; rfl]
  rw [ha4, h_least.csInf_eq]

/--
Conjecture: the sequence is infinite, that is, for every $n \geq 1$ there is some $k > n$
with $S(n) \mid S(k)$, so that $a(n)$ is defined.
-/
@[category research open, AMS 11]
theorem conjecture_infinite (n : ℕ) (hn : n > 0) : ∃ k > n, S n ∣ S k := by
  sorry

/--
Conjecture: $f(n, k) = 2$ for infinitely many cases, where $k = a(n)$.

No hypothesis on the existence of $a(n)$ is needed: if no suitable $k > n$ exists then
$a(n) = 0$ and $S(0) = 4 < 2 S(n)$, so such $n$ cannot be witnesses.
-/
@[category research open, AMS 11]
theorem conjecture1 (M : ℕ) :
    ∃ n : ℕ, n ≥ M ∧ n > 0 ∧ S (a n) = 2 * S n := by
  sorry

/--
Open problem: is the ratio $f(n, k)$ bounded, where $k = a(n)$?

No hypothesis on the existence of $a(n)$ is needed: if no suitable $k > n$ exists then
$a(n) = 0$ and $S(0) / S(n) = 4 / S(n) = 0$ for $n > 0$, so such $n$ do not affect boundedness.
When $a(n) \neq 0$ we have $S(n) \mid S(a(n))$ by definition, so the division is exact.
-/
@[category research open, question, AMS 11]
theorem conjecture2 : ∃ C : ℕ, ∀ n : ℕ, n > 0 → S (a n) / S n ≤ C := by
  sorry


end OeisA167918

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA167918.conjecture_infinite with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture_infinite : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch oeis-167918
nosorry submit oeis-167918 nosorry/oeis-167918/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.