/- 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. -/ import FormalConjecturesUtil

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

References:

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 := a 0 = 0 All goals completed! 🐙@[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_elevenh:Nat.Prime 13Nat.nth Nat.Prime 5 = 13 All goals completed! 🐙h:Nat.Prime 17Nat.nth Nat.Prime 6 = 17 All goals completed! 🐙h:Nat.Prime 19Nat.nth Nat.Prime 7 = 19 All goals completed! 🐙All goals completed! 🐙All goals completed! 🐙All goals completed! 🐙All goals completed! 🐙All goals completed! 🐙All goals completed! 🐙All goals completed! 🐙

Value of the sequence a at 1.

All goals completed! 🐙

Value of the sequence a at 2.

All goals completed! 🐙

Value of the sequence a at 3.

All goals completed! 🐙

Value of the sequence a at 4.

All goals completed! 🐙

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

We assume $a(n) \ne 0$ (i.e., that a suitable $k > n$ always exists), as sInf evaluates to $0$ on an empty set.

@[category research open, AMS 11] theorem conjecture1 (M : ) (ha : n > 0, a n 0) : n : , n M n > 0 S (a n) = 2 * S n := M:ha: n > 0, OeisA167918.a n 0 n M, n > 0 S (a n) = 2 * S n All goals completed! 🐙

Open problem: Whether the ratio $f(n, k)$ is bounded, where $k = a(n)$.

We assume $a(n) \ne 0$ (i.e., that a suitable $k > n$ always exists), as sInf evaluates to $0$ on an empty set.

@[category research open, AMS 11] theorem conjecture2 (ha : n > 0, a n 0) : C : , n : , n > 0 S (a n) / S n C := ha: n > 0, OeisA167918.a n 0 C, n > 0, S (OeisA167918.a n) / S n C All goals completed! 🐙end OeisA167918