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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Ordered ways to write 2n=p+q2n = p + q with p,qp, q and pp+2+2p_{p+2} + 2 all 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>2n > 2.

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

Formal statement

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

public import FormalConjecturesUtil

/-!
# Ordered ways to write $2n = p + q$ with $p, q$ and $p_{p+2} + 2$ all prime

Let $p_k$ denote the $k$-th prime number. The sequence $a(n)$ counts the number of ordered ways to
write $2n = p + q$ with $p, q$, and $p_{p+2} + 2$ all prime.

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

@[expose] public section

namespace OeisA236566

/-- $a(n)$ is the number of ordered ways to write $2n = p + q$ with $p, q$ and
$\operatorname{prime}(p + 2) + 2$ all prime. -/
noncomputable def a (n : ℕ) : ℕ :=
  ∑ p ∈ Finset.range (2 * n),
    if p.Prime ∧ (2 * n - p).Prime ∧ (Nat.nth Nat.Prime (p + 1) + 2).Prime then 1 else 0

@[category test, AMS 11]
theorem a_1 : a 1 = 0 := by
  have h : Finset.range 2 = {0, 1} := by decide
  simp only [a, Nat.reduceMul, h, Finset.sum_insert, Finset.mem_singleton,
    zero_ne_one, not_false_eq_true, Finset.sum_singleton]
  decide

@[category test, AMS 11]
theorem a_2 : a 2 = 0 := by
  have h : Finset.range 4 = {0, 1, 2, 3} := by decide
  simp only [a, Nat.reduceMul, h, Finset.sum_insert, Finset.mem_insert, Finset.mem_singleton,
    zero_ne_one, OfNat.zero_ne_ofNat, OfNat.one_ne_ofNat, Nat.reduceEqDiff, or_self,
    not_false_eq_true, Finset.sum_singleton, Nat.reduceAdd, Nat.nth_prime_three_eq_seven]
  decide

@[category test, AMS 11]
theorem a_3 : a 3 = 1 := by
  have h : Finset.range 6 = {0, 1, 2, 3, 4, 5} := by decide
  simp only [a, Nat.reduceMul, h, Finset.sum_insert, Finset.mem_insert, Finset.mem_singleton,
    zero_ne_one, OfNat.zero_ne_ofNat, OfNat.one_ne_ofNat, Nat.reduceEqDiff, or_self,
    not_false_eq_true, Finset.sum_singleton, Nat.reduceAdd, Nat.nth_prime_three_eq_seven,
    Nat.nth_prime_four_eq_eleven]
  decide

@[category test, AMS 11]
theorem a_4 : a 4 = 2 := by
  have h : Finset.range 8 = {0, 1, 2, 3, 4, 5, 6, 7} := by decide
  simp only [a, Nat.reduceMul, h, Finset.sum_insert, Finset.mem_insert, Finset.mem_singleton,
    zero_ne_one, OfNat.zero_ne_ofNat, OfNat.one_ne_ofNat, Nat.reduceEqDiff, or_self,
    not_false_eq_true, Finset.sum_singleton, Nat.reduceAdd, Nat.nth_prime_four_eq_eleven,
    Nat.nth_prime_six_eq_seventeen]
  decide

@[category test, AMS 11]
theorem a_5 : a 5 = 2 := by
  have h : Finset.range 10 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} := by decide
  simp only [a, Nat.reduceMul, h, Finset.sum_insert, Finset.mem_insert, Finset.mem_singleton,
    zero_ne_one, OfNat.zero_ne_ofNat, OfNat.one_ne_ofNat, Nat.reduceEqDiff, or_self,
    not_false_eq_true, Finset.sum_singleton, Nat.reduceAdd, Nat.nth_prime_four_eq_eleven,
    Nat.nth_prime_six_eq_seventeen, Nat.nth_prime_eight_eq_twentyThree]
  decide

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

/--
Conjecture: (ii) If $n > 30$, then $2n + 1$ can be written as $2p + q$ with $p$, $q$ and
$\operatorname{prime}(p + 2) + 2$ all prime.
-/
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) (hn : 30 < n) :
    ∃ p q : ℕ, p.Prime ∧ q.Prime ∧ (Nat.nth Nat.Prime (p + 1) + 2).Prime ∧
      2 * n + 1 = 2 * p + q := by
  sorry

end OeisA236566

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA236566.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-236566
nosorry submit oeis-236566 nosorry/oeis-236566/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.