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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Integers 0<k<n0 < k < n with p=k+prime(n−k)p = k + \mathrm{prime}(n - k) and prime(p)−p+1\mathrm{prime}(p) - p + 1 prime

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 (i): a(n)>0a(n) > 0 for all n>9n > 9.

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

Formal statement

theorem conjecture_1 (n : ℕ) (hn : 9 < n) : 0 < a n
Show the full Challenge.lean (146 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Integers $0 < k < n$ with $p = k + \mathrm{prime}(n - k)$ and $\mathrm{prime}(p) - p + 1$ prime

Let $\mathrm{prime}(m)$ denote the $m$-th prime number. The sequence $a(n)$ counts the integers
$0 < k < n$ such that $p = k + \mathrm{prime}(n - k)$ and $\mathrm{prime}(p) - p + 1$ are both
prime.

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

@[expose] public section

namespace OeisA234694

/--
Number of integers $0 < k < n$ such that $p = k + \mathrm{prime}(n - k)$
and $\mathrm{prime}(p) - p + 1$ are both prime, where $\mathrm{prime}(m)$ denotes the $m$-th prime.
-/
noncomputable def a (n : ℕ) : ℕ :=
  ∑ k ∈ Finset.Ico 1 n,
    let p := k + Nat.nth Nat.Prime (n - k - 1)
    if p.Prime ∧ Nat.Prime (Nat.nth Nat.Prime (p - 1) - p + 1) then 1 else 0

@[category test, AMS 11]
theorem a_1 : a 1 = 0 := by
  simp [a]

@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by
  have hIco : Finset.Ico 1 2 = {1} := by decide
  simp only [a, hIco, Finset.sum_singleton, Nat.reduceSub, Nat.reduceAdd,
    Nat.nth_prime_zero_eq_two, Nat.nth_prime_two_eq_five]
  decide

@[category test, AMS 11]
theorem a_3 : a 3 = 0 := by
  have hIco : Finset.Ico 1 3 = {1, 2} := by decide
  simp only [a, hIco, Finset.sum_insert, Finset.mem_singleton, OfNat.one_ne_ofNat,
    not_false_eq_true, Finset.sum_singleton, Nat.reduceSub, Nat.reduceAdd,
    Nat.nth_prime_zero_eq_two, Nat.nth_prime_one_eq_three, Nat.nth_prime_three_eq_seven]
  decide

@[category test, AMS 11]
theorem a_4 : a 4 = 2 := by
  have hIco : Finset.Ico 1 4 = {1, 2, 3} := by decide
  simp only [a, hIco, Finset.sum_insert, Finset.mem_insert, Finset.mem_singleton,
    OfNat.one_ne_ofNat, Nat.reduceEqDiff, or_self, not_false_eq_true, Finset.sum_singleton,
    Nat.reduceSub, Nat.reduceAdd, Nat.nth_prime_zero_eq_two, Nat.nth_prime_one_eq_three,
    Nat.nth_prime_two_eq_five, Nat.nth_prime_four_eq_eleven, Nat.nth_prime_five_eq_thirteen]
  decide

@[category test, AMS 11]
theorem a_5 : a 5 = 1 := by
  have hIco : Finset.Ico 1 5 = {1, 2, 3, 4} := by decide
  simp only [a, hIco, Finset.sum_insert, Finset.mem_insert, Finset.mem_singleton,
    OfNat.one_ne_ofNat, Nat.reduceEqDiff, or_self, not_false_eq_true, Finset.sum_singleton,
    Nat.reduceSub, Nat.reduceAdd, Nat.nth_prime_zero_eq_two, Nat.nth_prime_one_eq_three,
    Nat.nth_prime_two_eq_five, Nat.nth_prime_three_eq_seven, Nat.nth_prime_five_eq_thirteen,
    Nat.nth_prime_six_eq_seventeen, Nat.nth_prime_seven_eq_nineteen]
  decide

/--
Conjecture (i): $a(n) > 0$ for all $n > 9$.
-/
@[category research open, AMS 11]
theorem conjecture_1 (n : ℕ) (hn : 9 < n) : 0 < a n := by
  sorry

/--
Conjecture (i): For any integer $n > 51$ there is a positive integer $k < n$ such that
$p = k + \mathrm{prime}(n - k)$ and $\mathrm{prime}(p) + p + 1$ are both prime.
-/
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) (hn : 51 < n) :
    ∃ k, 0 < k ∧ k < n ∧
      let p := k + Nat.nth Nat.Prime (n - k - 1)
      p.Prime ∧ Nat.Prime (Nat.nth Nat.Prime (p - 1) + p + 1) := by
  sorry

/--
Conjecture (ii): If $n > 9$, then there is a positive integer $k < n$ such that
$m - 1$ and $\mathrm{prime}(m) + m$ are both prime, where $m = k + \mathrm{prime}(n - k)$.
-/
@[category research open, AMS 11]
theorem conjecture_3 (n : ℕ) (hn : 9 < n) :
    ∃ k, 0 < k ∧ k < n ∧
      let m := k + Nat.nth Nat.Prime (n - k - 1)
      Nat.Prime (m - 1) ∧ Nat.Prime (Nat.nth Nat.Prime (m - 1) + m) := by
  sorry

/--
Conjecture (ii): If $n > 21$, then there is a positive integer $k < n$ such that
$m - 1$ and $\mathrm{prime}(m) - m$ are both prime, where $m = k + \mathrm{prime}(n - k)$.
-/
@[category research open, AMS 11]
theorem conjecture_4 (n : ℕ) (hn : 21 < n) :
    ∃ k, 0 < k ∧ k < n ∧
      let m := k + Nat.nth Nat.Prime (n - k - 1)
      Nat.Prime (m - 1) ∧ Nat.Prime (Nat.nth Nat.Prime (m - 1) - m) := by
  sorry

/--
Conjecture (iii): If $n > 483$, then for some $0 < k < n$ both $\mathrm{prime}(m) + m$
and $\mathrm{prime}(m) - m$ are prime, where $m = k + \mathrm{prime}(n - k)$.
-/
@[category research open, AMS 11]
theorem conjecture_5 (n : ℕ) (hn : 483 < n) :
    ∃ k, 0 < k ∧ k < n ∧
      let m := k + Nat.nth Nat.Prime (n - k - 1)
      Nat.Prime (Nat.nth Nat.Prime (m - 1) + m) ∧
      Nat.Prime (Nat.nth Nat.Prime (m - 1) - m) := by
  sorry

/--
Conjecture (iv): If $n > 3$, then there is a positive integer $k < n$ such that
$\mathrm{prime}(k + \mathrm{prime}(n - k)) + 2$ is prime.
-/
@[category research open, AMS 11]
theorem conjecture_6 (n : ℕ) (hn : 3 < n) :
    ∃ k, 0 < k ∧ k < n ∧
      let m := k + Nat.nth Nat.Prime (n - k - 1)
      Nat.Prime (Nat.nth Nat.Prime (m - 1) + 2) := by
  sorry

end OeisA234694

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

nosorry fetch oeis-234694
nosorry submit oeis-234694 nosorry/oeis-234694/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.