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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Primality and primitive root property from divisibility n∣(a(n−1)+2n−2)n \mid (a(n-1) + 2^{n-2})

Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Conjecture (for n>2n > 2): if n∣a(n−1)+2n−2n \mid a(n-1) + 2^{n-2}, then nn is a prime with primitive root 2 (A001122). - Amiram Eldar and Thomas Ordowski, Jan 19 2020

A formal proof has been found with the methods described in arxiv/2605.22763.

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

Formal statement

theorem prime_and_primitive_root_of_dvd (n : ℕ) (hn : n > 2) : n ∣ (a (n - 1) + 2 ^ (n - 2)) →
    Nat.Prime n ∧ IsPrimitiveRoot (2 : ZMod n) (Nat.totient n)
Show the full Challenge.lean (89 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Primality and primitive root property from divisibility $n \mid (a(n-1) + 2^{n-2})$

$a(n) = \frac{2^{n-1}}{n!} \prod_{k=1}^{n-1} (2^k-1)$.
The sequence $a(n)$ is composed of natural numbers, thus we define it
as a function $\mathbb{N} \to \mathbb{N}$.

*References:*
- [A091669](https://oeis.org/A091669)
- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.
-/

@[expose] public section

namespace OeisA91669


open Nat BigOperators

/--
$a(n) = \frac{2^{n-1}}{n!} \prod_{k=1}^{n-1} (2^k-1)$.
The sequence $a(n)$ is composed of natural numbers, thus we define it
as a function $\mathbb{N} \to \mathbb{N}$.
-/
def a (n : ℕ) : ℕ :=
  if n = 0 then 0 -- Sequence is defined for n >= 1.
  else
    let n_pred : ℕ := n.pred

    -- The numerator of the expression. Both factors are in ℕ.
    let numerator : ℕ := (2 ^ n_pred) * (Finset.Ico 1 n).prod (fun k => 2 ^ k - 1)

    -- The denominator is $n!$.
    let denominator : ℕ := n.factorial

    -- The division is exact, since the result is an integer sequence.
    numerator / denominator


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

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

@[category test, AMS 11]
lemma a_3 : a 3 = 2 := by rfl

@[category test, AMS 11]
lemma a_4 : a 4 = 7 := by rfl

@[category test, AMS 11]
lemma a_5 : a 5 = 42 := by rfl


set_option linter.style.formal_proof_palomar false in
/--
Conjecture (for $n > 2$): if $n \mid a(n-1) + 2^{n-2}$, then $n$ is a prime with primitive root 2 (A001122). - _Amiram Eldar_ and _Thomas Ordowski_, Jan 19 2020

A formal proof has been found with the methods described in
[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).
-/
@[category research solved, AMS 11, formal_proof using formal_conjectures at
"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/91669.wip.lean#L250"]
theorem prime_and_primitive_root_of_dvd (n : ℕ) (hn : n > 2) : n ∣ (a (n - 1) + 2 ^ (n - 2)) →
    Nat.Prime n ∧ IsPrimitiveRoot (2 : ZMod n) (Nat.totient n) := by
    sorry

end OeisA91669

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

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