File size: 1,290 Bytes
b797a5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import OAI.NumberTheory.PrimeGaps.Density
import OAI.NumberTheory.PrimeGaps.RatioAlgebra

namespace OAI

namespace Problem344

theorem mem_ratioIncreaseIndices_iff_gap {n : ℕ} :
    n ∈ ratioIncreaseIndices ↔
      1 ≤ n ∧ (primeAt n : ℝ) / (n : ℝ) <
        (primeAt (n + 1) : ℝ) - (primeAt n : ℝ) := by
  constructor
  · rintro ⟨hn, hratio⟩
    exact ⟨hn, (div_lt_div_succ_iff_gap hn).1 hratio⟩
  · rintro ⟨hn, hgap⟩
    exact ⟨hn, (div_lt_div_succ_iff_gap hn).2 hgap⟩

theorem mem_ratioIncreaseIndices_of_mem_largeGapIndices {C : ℝ} {n : ℕ}
    (hbound : (primeAt n : ℝ) / (n : ℝ) ≤ C * Real.log (primeAt n : ℝ))
    (hgap : n ∈ largeGapIndices C) : n ∈ ratioIncreaseIndices := by
  apply mem_ratioIncreaseIndices_iff_gap.2
  exact ⟨hgap.1, lt_of_le_of_lt hbound hgap.2⟩

theorem eventually_largeGapIndices_subset_ratioIncreaseIndices {C : ℝ}
    (hbound : ∃ N0 : ℕ, ∀ n : ℕ, N0 ≤ n →
      (primeAt n : ℝ) / (n : ℝ) ≤ C * Real.log (primeAt n : ℝ)) :
    ∃ N0 : ℕ, ∀ n : ℕ, N0 ≤ n →
      n ∈ largeGapIndices C → n ∈ ratioIncreaseIndices := by
  obtain ⟨N0, hN0⟩ := hbound
  exact ⟨N0, fun n hn => mem_ratioIncreaseIndices_of_mem_largeGapIndices (hN0 n hn)⟩

end Problem344

end OAI