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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:a(0)=1a(0) = 1, a(n)=a(n−1)a(n−1)+2a(n) = a(n-1)a(n-1) + 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:

Prime for a(1)=3a(1) = 3, a(2)=11a(2) = 11, a(4)=15131a(4) = 15131; semiprime for a(3)=123=3∗41a(3) = 123 = 3 * 41, a(5)=228947163=3∗76315721a(5) = 228947163 = 3 * 76315721. a(6)a(6), added by Jonathan Vos Post, has 4 prime factors. a(7)=41∗8112∗106693969∗317171188688357726699∗8272236925540996054440172449761a(7) = 41 * 811^2 * 106693969 * 317171188688357726699 * 8272236925540996054440172449761. When is the next prime in the sequence?

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

Formal statement

theorem conjecture : conjecture.answer = sInf {n : ℕ | 4 < n ∧ (a n).Prime}
Show the full Challenge.lean (79 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# $a(0) = 1$, $a(n) = a(n-1)a(n-1) + 2$

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

@[expose] public section

namespace OeisA102847

/-- The primary defining sequence `a`.
$a(0)=1$, $a(n) = a(n-1)^2 + 2$. -/
def a : ℕ → ℕ
  | 0 => 1
  | n + 1 => (a n) ^ 2 + 2

/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/
@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by rfl

@[category test, AMS 11]
theorem a_1 : a 1 = 3 := by rfl

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

@[category test, AMS 11]
theorem a_3 : a 3 = 123 := by rfl

@[category test, AMS 11]
theorem a_4 : a 4 = 15131 := by rfl

@[category test, AMS 11]
theorem a_5 : a 5 = 228947163 := by rfl

@[category test, AMS 11]
theorem a_6 : a 6 = 52416803445748571 := by rfl

@[category test, AMS 11]
theorem not_prime_a_5 : ¬ (a 5).Prime := by
  have heq : a 5 = 3 * 76315721 := by rw [a_5]
  rw [heq]
  exact Nat.not_prime_mul (by decide) (by decide)

def conjecture.answer : ℕ := sorry

/--
Prime for $a(1) = 3$, $a(2) = 11$, $a(4) = 15131$; semiprime for $a(3) = 123 = 3 * 41$,
$a(5) = 228947163 = 3 * 76315721$.
$a(6)$, added by Jonathan Vos Post, has 4 prime factors.
$a(7) = 41 * 811^2 * 106693969 * 317171188688357726699 * 8272236925540996054440172449761$.
When is the next prime in the sequence?
-/
@[category research open, question value, AMS 11]
theorem conjecture : conjecture.answer = sInf {n : ℕ | 4 < n ∧ (a n).Prime} := by
  sorry

end OeisA102847

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