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 · a_3

Source:OEIS conjectures
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Statement:

No informal statement.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.04471 [math.NT] · NS.04471v1 for this version
Declaration:OeisA102847.a_3
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
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 a_3 : a 3 = 123
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.a_3 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_a_3 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk oeis-102847--a-3      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch oeis-102847--a-3
nosorry submit oeis-102847--a-3 nosorry/oeis-102847--a-3/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.