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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Twin primes of the form (3n−k)2n±1(3^n - k) 2^n \pm 1

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: There is always one such kk for each n>0n > 0 such that (3n−k)2n−1(3^n - k) 2^n - 1 and (3n−k)2n+1(3^n - k) 2^n + 1 are a twin prime pair.

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

Formal statement

theorem conjecture (n : ℕ) (hn : 0 < n) : (a n).isSome
Show the full Challenge.lean (82 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Twin primes of the form $(3^n - k) 2^n \pm 1$

For $n > 0$, $a(n)$ is the smallest nonnegative integer $k$ such that $(3^n - k) 2^n - 1$ and
$(3^n - k) 2^n + 1$ form a twin prime pair.

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

@[expose] public section

namespace OeisA214497

/-- Smallest $k \ge 0$ such that $(3^n - k) 2^n - 1$ and $(3^n - k) 2^n + 1$
are both prime, or `none` if no such $k$ exists. -/
def a (n : ℕ) : Option ℕ :=
  (List.range (3 ^ n)).find? fun k =>
    Nat.Prime ((3 ^ n - k) * 2 ^ n - 1) && Nat.Prime ((3 ^ n - k) * 2 ^ n + 1)

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

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

@[category test, AMS 11]
theorem a_3 : a 3 = some 3 := by
  rw [a, List.find?_eq_some_iff_getElem]
  refine ⟨?_, 3, by simp, rfl, fun j hj => ?_⟩
  · simp only [Bool.and_eq_true, decide_eq_true_eq]
    norm_num
  · simp only [List.getElem_range]
    interval_cases j <;> norm_num

@[category test, AMS 11]
theorem a_4 : a 4 = some 9 := by
  rw [a, List.find?_eq_some_iff_getElem]
  refine ⟨?_, 9, by simp, rfl, fun j hj => ?_⟩
  · simp only [Bool.and_eq_true, decide_eq_true_eq]
    norm_num
  · simp only [List.getElem_range]
    interval_cases j <;> norm_num

@[category test, AMS 11]
theorem a_5 : a 5 = some 9 := by
  rw [a, List.find?_eq_some_iff_getElem]
  refine ⟨?_, 9, by simp, rfl, fun j hj => ?_⟩
  · simp only [Bool.and_eq_true, decide_eq_true_eq]
    norm_num
  · simp only [List.getElem_range]
    interval_cases j <;> norm_num

/--
Conjecture: There is always one such $k$ for each $n > 0$ such that
$(3^n - k) 2^n - 1$ and $(3^n - k) 2^n + 1$ are a twin prime pair.
-/
@[category research open, AMS 11]
theorem conjecture (n : ℕ) (hn : 0 < n) : (a n).isSome := by
  sorry

end OeisA214497

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

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