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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Number of primes between n3−nn^3 - n and n3n^3

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: For every n>13n > 13, a(n)>0a(n) > 0.

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

Formal statement

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

public import FormalConjecturesUtil

/-!
# Number of primes between $n^3 - n$ and $n^3$

For $n \ge 1$, $a(n)$ is the number of primes $p$ satisfying $n^3 - n < p \le n^3$,
given by $\pi(n^3) - \pi(n^3 - n)$.

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

@[expose] public section

namespace OeisA216265

/-- Number of primes between $n^3 - n$ and $n^3$. -/
def a (n : ℕ) : ℕ :=
  Nat.primeCounting (n ^ 3) - Nat.primeCounting (n ^ 3 - n)

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

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

@[category test, AMS 11]
theorem a_3 : a 3 = 0 := by decide

@[category test, AMS 11]
theorem a_4 : a 4 = 1 := by
  have hp : ∀ {k : ℕ}, (k + 1).Prime →
      Nat.primeCounting (k + 1) = Nat.primeCounting k + 1 := fun {k} h => by
    rw [← Nat.primesLE_card_eq_primeCounting, ← Nat.primesLE_card_eq_primeCounting,
      Nat.primesLE_succ, if_pos h, Finset.card_insert_of_notMem (Nat.notMem_primesLE k)]
  have hn : ∀ {k : ℕ}, ¬ (k + 1).Prime →
      Nat.primeCounting (k + 1) = Nat.primeCounting k := fun {k} h => by
    rw [← Nat.primesLE_card_eq_primeCounting, ← Nat.primesLE_card_eq_primeCounting,
      Nat.primesLE_succ, if_neg h]
  rw [a, show 4 ^ 3 - 4 = 60 by norm_num, show 4 ^ 3 = 63 + 1 by norm_num]
  rw [hn (by norm_num : ¬ (63 + 1).Prime)]
  rw [show (63 : ℕ) = 62 + 1 from rfl, hn (by norm_num)]
  rw [show (62 : ℕ) = 61 + 1 from rfl, hn (by norm_num)]
  rw [show (61 : ℕ) = 60 + 1 from rfl, hp (by norm_num)]
  omega

@[category test, AMS 11]
theorem a_5 : a 5 = 0 := by
  have hn : ∀ {k : ℕ}, ¬ (k + 1).Prime →
      Nat.primeCounting (k + 1) = Nat.primeCounting k := fun {k} h => by
    rw [← Nat.primesLE_card_eq_primeCounting, ← Nat.primesLE_card_eq_primeCounting,
      Nat.primesLE_succ, if_neg h]
  rw [a, show 5 ^ 3 - 5 = 120 by norm_num, show 5 ^ 3 = 124 + 1 by norm_num]
  rw [hn (by norm_num : ¬ (124 + 1).Prime)]
  rw [show (124 : ℕ) = 123 + 1 from rfl, hn (by norm_num)]
  rw [show (123 : ℕ) = 122 + 1 from rfl, hn (by norm_num)]
  rw [show (122 : ℕ) = 121 + 1 from rfl, hn (by norm_num)]
  rw [show (121 : ℕ) = 120 + 1 from rfl, hn (by norm_num)]
  omega

@[category test, AMS 11]
theorem a_10 : a 10 = 2 := by
  have hp : ∀ {k : ℕ}, (k + 1).Prime →
      Nat.primeCounting (k + 1) = Nat.primeCounting k + 1 := fun {k} h => by
    rw [← Nat.primesLE_card_eq_primeCounting, ← Nat.primesLE_card_eq_primeCounting,
      Nat.primesLE_succ, if_pos h, Finset.card_insert_of_notMem (Nat.notMem_primesLE k)]
  have hn : ∀ {k : ℕ}, ¬ (k + 1).Prime →
      Nat.primeCounting (k + 1) = Nat.primeCounting k := fun {k} h => by
    rw [← Nat.primesLE_card_eq_primeCounting, ← Nat.primesLE_card_eq_primeCounting,
      Nat.primesLE_succ, if_neg h]
  rw [a, show 10 ^ 3 - 10 = 990 by norm_num, show 10 ^ 3 = 999 + 1 by norm_num]
  rw [hn (by norm_num : ¬ (999 + 1).Prime)]
  rw [show (999 : ℕ) = 998 + 1 from rfl, hn (by norm_num)]
  rw [show (998 : ℕ) = 997 + 1 from rfl, hn (by norm_num)]
  rw [show (997 : ℕ) = 996 + 1 from rfl, hp (by norm_num)]
  rw [show (996 : ℕ) = 995 + 1 from rfl, hn (by norm_num)]
  rw [show (995 : ℕ) = 994 + 1 from rfl, hn (by norm_num)]
  rw [show (994 : ℕ) = 993 + 1 from rfl, hn (by norm_num)]
  rw [show (993 : ℕ) = 992 + 1 from rfl, hn (by norm_num)]
  rw [show (992 : ℕ) = 991 + 1 from rfl, hn (by norm_num)]
  rw [show (991 : ℕ) = 990 + 1 from rfl, hp (by norm_num)]
  omega

/--
Conjecture: For every $n > 13$, $a(n) > 0$.
-/
@[category research open, AMS 11]
theorem conjecture (n : ℕ) (hn : 13 < n) : 0 < a n := by
  sorry

end OeisA216265

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