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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Primes p<np < n with n2−n+pn^2 - n + p and n2+n−pn^2 + n - p 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: a(n)>0a(n) > 0 for all n>2732n > 2732.

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

Formal statement

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

public import FormalConjecturesUtil

/-!
# Primes $p < n$ with $n^2 - n + p$ and $n^2 + n - p$ prime

For $n \ge 1$, $a(n)$ is the number of primes $p < n$ such that $n^2 - n + p$ and $n^2 + n - p$
are both prime.

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

@[expose] public section

namespace OeisA219023

/-- $a(n)$ is the number of primes $p < n$ such that $n^2 - n + p$ and $n^2 + n - p$
are both prime. -/
def a (n : ℕ) : ℕ :=
  ∑ p ∈ (Finset.range n).filter Nat.Prime,
    if Nat.Prime (n ^ 2 - n + p) ∧ Nat.Prime (n ^ 2 + n - p) then 1 else 0

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

@[category test, AMS 11]
theorem a_2 : a 2 = 0 := by decide

@[category test, AMS 11]
theorem a_3 : a 3 = 0 := by decide

@[category test, AMS 11]
theorem a_4 : a 4 = 0 := by decide

@[category test, AMS 11]
theorem a_8 : a 8 = 1 := by decide

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

/--
Conjecture: For $n > 3512$, there is a prime $p \in (n, 2n)$
such that both $n^2 - n + p$ and $n^2 + n - p$ are prime.
- _Zhi-Wei Sun_
-/
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) (hn : 3512 < n) :
    ∃ p : ℕ, p.Prime ∧ n < p ∧ p < 2 * n ∧
      Nat.Prime (n ^ 2 - n + p) ∧ Nat.Prime (n ^ 2 + n - p) := by
  sorry

/--
Conjecture: For $n > 1828$, there is a prime $p < n$ such that
both $n^2 - n - p$ and $n^2 + n + p$ are prime.
- _Zhi-Wei Sun_
-/
@[category research open, AMS 11]
theorem conjecture_3 (n : ℕ) (hn : 1828 < n) :
    ∃ p : ℕ, p.Prime ∧ p < n ∧
      Nat.Prime (n ^ 2 - n - p) ∧ Nat.Prime (n ^ 2 + n + p) := by
  sorry

/--
Conjecture: For $n > 4517$, there is a prime $p \in (n, 2n)$
such that both $n^2 - n - p$ and $n^2 + n + p$ are prime.
- _Zhi-Wei Sun_
-/
@[category research open, AMS 11]
theorem conjecture_4 (n : ℕ) (hn : 4517 < n) :
    ∃ p : ℕ, p.Prime ∧ n < p ∧ p < 2 * n ∧
      Nat.Prime (n ^ 2 - n - p) ∧ Nat.Prime (n ^ 2 + n + p) := by
  sorry

end OeisA219023

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