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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Smallest number kk such that kn+1kn + 1 is prime

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>1n > 1 there exists a number k<nk < n such that nk+1nk + 1 is a prime.

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

Formal statement

theorem exists_k {n : ℕ} (hn : 1 < n) : ∃ k < n, (n * k + 1).Prime
Show the full Challenge.lean (105 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Smallest number $k$ such that $kn + 1$ is prime

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

@[expose] public section

namespace OeisA34693

open Filter

/-- Smallest number $k$ such that $kn + 1$ is prime. -/
noncomputable def a (n : ℕ) : ℕ := Nat.nth (fun k ↦ (k * n + 1).Prime) 0

@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by simp [a]

@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by
  conv_rhs => rw [← Nat.nth_count (p := fun k ↦ (k + 1).Prime) (n := 1) (by norm_num)]
  aesop (add simp [a])

@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by
  conv_rhs => rw [← Nat.nth_count (p := fun k ↦ (k * 2 + 1).Prime) (n := 1) (by norm_num)]
  aesop (add simp [a])

@[category test, AMS 11]
theorem a_3 : a 3 = 2 := by
  conv_rhs => rw [← Nat.nth_count (p := fun k ↦ (k * 3 + 1).Prime) (n := 2) (by norm_num)]
  aesop (add simp [a])

@[category test, AMS 11]
theorem a_7 : a 7 = 4 := by
  conv_rhs => rw [← Nat.nth_count (p := fun k ↦ (k * 7 + 1).Prime) (n := 4) (by norm_num)]
  aesop (add simp [a])

/-- Conjecture: for every $n > 1$ there exists a number $k < n$ such that $nk + 1$ is a prime. -/
@[category research open, AMS 11]
theorem exists_k {n : ℕ} (hn : 1 < n) : ∃ k < n, (n * k + 1).Prime := by
  sorry

/-- A stronger conjecture: for every n there exists a number $k < 1 + n^{0.75}$ such that
$nk + 1$ is a prime. -/
@[category research open, AMS 11]
theorem exists_k_stronger {n : ℕ} (hn : 0 < n) : ∃ k : ℕ,
    k < 1 + (Real.nthRoot 4 n) ^ 3 ∧ (n * k + 1).Prime := by
  sorry

/-- The expression $1 + n^{0.74}$ does not work as an upper bound. -/
@[category research solved, AMS 11]
theorem exists_k_best_possible : ∃ n > (0 : ℕ), ∀ (k : ℕ),
    k < 1 + (Real.nthRoot 100 n) ^ 74 → ¬(n * k + 1).Prime := by
  refine ⟨19, by norm_num, ?_⟩
  have hy : Real.nthRoot 100 ((19 : ℕ) : ℝ) = (19 : ℝ) ^ (((100 : ℕ) : ℝ))⁻¹ := by
    simp only [Real.nthRoot]
    rw [if_pos (by decide : Even 100)]
    norm_num
  have h100 : (Real.nthRoot 100 ((19 : ℕ) : ℝ)) ^ (100 : ℕ) = 19 := by
    rw [hy]; exact Real.rpow_inv_natCast_pow (by norm_num) (by norm_num)
  have hb : (Real.nthRoot 100 ((19 : ℕ) : ℝ)) ^ 74 ≤ 9 := by
    apply le_of_pow_le_pow_left₀ (n := 100) (by norm_num) (by norm_num)
    have e : ((Real.nthRoot 100 ((19 : ℕ) : ℝ)) ^ (74 : ℕ)) ^ (100 : ℕ)
        = ((Real.nthRoot 100 ((19 : ℕ) : ℝ)) ^ (100 : ℕ)) ^ (74 : ℕ) := by
      rw [← pow_mul, ← pow_mul, Nat.mul_comm]
    rw [e, h100]
    norm_num
  intro k hk
  have hk10 : (k : ℝ) < 10 := by linarith
  have hk10' : k < 10 := by exact_mod_cast hk10
  interval_cases k <;> norm_num

/-- Conjecture: $a(n) = O(\log(n)\log(\log(n)))$. -/
@[category research open, AMS 11]
theorem a_isBigO : (fun n ↦ (a n : ℝ)) =O[atTop] (fun n ↦ Real.log n * Real.log (Real.log n)) := by
  sorry

/-- Counter-conjecture to `a_isBigO`: $a(n) / (\log n \log \log n)$ is unbounded. -/
@[category research open, AMS 11]
theorem a_unbounded : ¬BddAbove (Set.range fun n ↦ a n / (Real.log n * Real.log (Real.log n))) := by
  sorry

end OeisA34693

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

nosorry fetch oeis-34693
nosorry submit oeis-34693 nosorry/oeis-34693/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.