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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Primes pp such that n−(pn′−1)n - (p n' - 1) and n+(pn′−1)n + (p n' - 1) are both prime · conjecture_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: a(n)=1a(n) = 1 only for n=5,7,10,11,12,19,22,30,34,44,46,72,142n = 5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05984 [math.NT] · NS.05984v1 for this version
Declaration:OeisA261627.conjecture_2
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100; accepted critique: up to 100
Statement hash:51c42bc874acda602a96b6afdc9f238e63681364ea38e128bb1b1f35e896cd79
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/261627.lean

Formal statement

theorem conjecture_2 (n : ℕ) :
    a n = 1 ↔ n ∈ singletons
Show the full Challenge.lean (86 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Primes $p$ such that $n - (p n' - 1)$ and $n + (p n' - 1)$ are both prime

Number of primes $p$ such that $n - (p n' - 1)$ and $n + (p n' - 1)$ are both prime,
where $n'$ is $1$ or $2$ according as $n$ is odd or even.

*References:*
- [A261627](https://oeis.org/A261627)
- [Conjectures involving primes and quadratic forms](https://arxiv.org/abs/1211.1588)
  by *Zhi-Wei Sun*, arXiv:1211.1588 (2012-2015)
-/

@[expose] public section

namespace OeisA261627

/--
The number of primes $p$ such that $n - (p n' - 1)$ and $n + (p n' - 1)$ are both prime,
where $n' = 1$ if $n$ is odd and $n' = 2$ if $n$ is even.
-/
def a (n : ℕ) : ℕ :=
  let n' : ℕ := if n % 2 = 1 then 1 else 2
  ((Finset.range (n + 1)).filter (fun p =>
    p.Prime ∧
    let k := p * n' - 1
    k < n ∧ Nat.Prime (n - k) ∧ Nat.Prime (n + k))).card

@[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_5 : a 5 = 1 := by decide

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

/-- The set of exceptional values of $n$ for which $a(n) = 1$. -/
def singletons : Finset ℕ :=
  {5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142}

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

/--
Conjecture: $a(n) = 1$ only for
$n = 5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142$.
-/
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) :
    a n = 1 ↔ n ∈ singletons := by
  sorry

end OeisA261627

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

nosorry desk oeis-261627--conjecture-2      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch oeis-261627--conjecture-2
nosorry submit oeis-261627--conjecture-2 nosorry/oeis-261627--conjecture-2/Solution.lean --wait

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.