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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]
Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points k.

This is false. The five-term block starting at n=3n = 3 is (2,4,2,4,2)(2,4,2,4,2), and a congruence modulo 55 shows that it occurs only at n=3n = 3.

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

Formal statement

theorem conjecture :
    ¬ ∀ (n m : ℕ), n ≥ 3 →
      Set.Infinite {k : ℕ | gapSubsequence k (m + 1) = gapSubsequence n (m + 1)}
Show the full Challenge.lean (80 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Prime gaps

Differences between consecutive primes: $a(n) = p_{n+1} - p_n$.

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

@[expose] public section

namespace OeisA1223

/-- Prime gaps: differences between consecutive primes. -/
noncomputable def a (n : ℕ) : ℕ :=
  if n = 0 then 0
  else Nat.nth Nat.Prime n - Nat.nth Nat.Prime (n - 1)

/-- Helper definition for extracting a finite subsequence (pattern) as a list. -/
noncomputable def gapSubsequence (startIndex length : ℕ) : List ℕ :=
  (List.range length).map (fun i => a (startIndex + i))

/-- Value of the sequence `a` at 0. -/
@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by rfl

/-- Value of the sequence `a` at 1. -/
@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by
  change Nat.nth Nat.Prime 1 - Nat.nth Nat.Prime 0 = 1
  rw [Nat.nth_prime_one_eq_three, Nat.nth_prime_zero_eq_two]

/-- Value of the sequence `a` at 2. -/
@[category test, AMS 11]
theorem a_2 : a 2 = 2 := by
  change Nat.nth Nat.Prime 2 - Nat.nth Nat.Prime 1 = 2
  rw [Nat.nth_prime_two_eq_five, Nat.nth_prime_one_eq_three]

/-- Value of the sequence `a` at 3. -/
@[category test, AMS 11]
theorem a_3 : a 3 = 2 := by
  change Nat.nth Nat.Prime 3 - Nat.nth Nat.Prime 2 = 2
  rw [Nat.nth_prime_three_eq_seven, Nat.nth_prime_two_eq_five]

set_option linter.style.formal_proof_palomar false in
/--
Any subsequence a(n .. n+m) with n > 2 (as to exclude the
untypical primes 2 and 3) should occur infinitely many times at other starting points k.

This is false. The five-term block starting at $n = 3$ is $(2,4,2,4,2)$, and a congruence
modulo $5$ shows that it occurs only at $n = 3$.
-/
@[category research solved, AMS 11, formal_proof using lean4 at
  "https://github.com/epoch-research/LeanOpenProblems-results/blob/f02efd9a8c5fc6a735d2a90c33e24f7278ce0ffc/runs/oeis-full-50usd-oai-jajpvieznaevpoyg/prime_gap_subsequences_occur_infinitely_often/Submission/Spec.lean#L134"]
theorem conjecture :
    ¬ ∀ (n m : ℕ), n ≥ 3 →
      Set.Infinite {k : ℕ | gapSubsequence k (m + 1) = gapSubsequence n (m + 1)} := by
  sorry

end OeisA1223

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