Andrica's gap inequality at first-occurrence maximal prime gaps above
OpenAndricaConjecture.andrica_record_gap_above_2pow64Let be the primes in zero-based indexing, so , , and . Call an index a first-occurrence record for the prime gap if every earlier gap is strictly smaller:
This theorem asserts the gap form of Andrica's conjecture at every record index whose prime is at least :
It is the open asymptotic tail of AndricaConjecture.andrica_record_gap, beyond the range covered by the exhaustive maximal-gap computations. The bound is the end of the 2018 Prime Gap Search verification; every record above it lies outside every finite maximal-gap table, and the statement is the genuinely open part of the maximal-gap approach to Andrica's conjecture.
Formalization Note The hypothesis bounds the prime , not the index . The subtraction is in and is harmless because consecutive primes increase.
import Mathlib
namespace AndricaConjecture
theorem andrica_record_gap_above_2pow64 (n : Nat)
(hn : 2 ^ 64 ≤ Nat.nth Nat.Prime n)
(hrec : ∀ m : Nat, m < n →
Nat.nth Nat.Prime (m + 1) - Nat.nth Nat.Prime m <
Nat.nth Nat.Prime (n + 1) - Nat.nth Nat.Prime n) :
(Nat.nth Nat.Prime (n + 1) - Nat.nth Nat.Prime n : Real) <
2 * Real.sqrt (Nat.nth Nat.Prime n : Real) + 1 := by
sorry
end AndricaConjecture