{
  "id": "2282",
  "ident": "NS.02282",
  "slug": "erdos-5",
  "title": "Erdős Problem 5",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $C\\geq 0$. Is there an infinite sequence of $n_i$ such that\n$$\\lim_{i\\to \\infty}\\frac{p_{n_i+1}-p_{n_i}}{\\log n_i}=C?$$\n\nWe formalise \"an infinite sequence of $n_i$\" as a strictly monotone sequence of indices\n`n : ℕ → ℕ`. Note that the numerator is the gap between the two *consecutive* primes\n$p_{n_i}$ and $p_{n_i+1}$, which is `primeGap (n i)`, and not the gap between the primes\nindexed by two consecutive members of the sequence.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos5.erdos_5",
  "statement_lean": "theorem erdos_5 : ∀ C : ℝ, 0 ≤ C →\n    ∃ n : ℕ → ℕ, StrictMono n ∧ Tendsto (fun i => normalizedGap (n i)) atTop (𝓝 C)",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 5\n\n*References:*\n- [erdosproblems.com/5](https://www.erdosproblems.com/5)\n- [BFM16] Banks, William D. and Freiberg, Tristan and Maynard, James, *On limit points of the\n  sequence of normalized prime gaps*. Proc. Lond. Math. Soc. (3) (2016), 515-539.\n- [Er55] Erdős, Paul, *Some remarks on number theory*. Riveon Lematematika (1955), 45-48.\n- [Er65b] Erdős, Paul, *Some recent advances and current problems in number theory*. Lectures on\n  Modern Mathematics, Vol. III (1965), 196-244.\n- [Er85c] Erdős, P., *On some of my problems in number theory I would most like to see solved*.\n  Number theory (Ootacamund, 1984) (1985), 74-84.\n- [Er97c] Erdős, Paul, *Some of my favorite problems and results*. The mathematics of Paul Erdős,\n  I (1997), 47-67.\n- [GPY09] Goldston, Daniel A. and Pintz, János and Yıldırım, Cem Y., *Primes in tuples. I*.\n  Ann. of Math. (2) (2009), 819-862.\n- [HiMa88] Hildebrand, Adolf and Maier, Helmut, *Gaps between prime numbers*. Proc. Amer. Math.\n  Soc. (1988), 1-9.\n- [Me20] Merikoski, Jori, *Limit points of normalized prime gaps*. J. Lond. Math. Soc. (2) (2020),\n  99-124.\n- [Pi16] Pintz, János, *Polignac numbers, conjectures of Erdős on gaps between primes, arithmetic\n  progressions in primes, and the bounded gap conjecture*. From arithmetic to zeta-functions\n  (2016), 367-384.\n- [Ri56] Ricci, Giovanni, *Recherches sur l'allure de la suite $\\{p_{n+1}-p_n/\\log p_n\\}$*.\n  Colloque sur la Théorie des Nombres, Bruxelles, 1955 (1956), 93-106.\n- [We31] Westzynthius, E., *Über die Verteilung der Zahlen, die zu den n ersten Primzahlen\n  teilerfremd sind*. Commentat. Phys. Math. (1931), 1-37.\n-/\n\n@[expose] public section\n\nopen Filter MeasureTheory Real Set\nopen scoped Topology\n\nnamespace Erdos5\n\n/--\nThe normalised prime gap $\\frac{p_{n+1}-p_n}{\\log n}$, where $p_n$ denotes the $n$-th prime.\n-/\nnoncomputable def normalizedGap (n : ℕ) : ℝ := primeGap n / log n\n\n/--\nThe set $S$ of limit points of $\\frac{p_{n+1}-p_n}{\\log n}$.\n\nOnly the *finite* limit points are collected here; that $\\infty$ is also a limit point is\nWestzynthius' theorem, recorded separately as `erdos_5.variants.westzynthius`.\n\nErdős' question, as well as [HiMa88] and [Pi16], normalises the prime gaps by $\\log n$, whereas\n[GPY09], [BFM16] and [Me20] normalise by $\\log p_n$. Since $\\log p_n/\\log n \\to 1$ the two\nnormalisations have the same limit points, so all the results below are stated for the\nnormalisation used here.\n-/\ndef limitPointSet : Set ℝ := {x : ℝ | MapClusterPt x atTop normalizedGap}\n\n/--\nLet $C\\geq 0$. Is there an infinite sequence of $n_i$ such that\n$$\\lim_{i\\to \\infty}\\frac{p_{n_i+1}-p_{n_i}}{\\log n_i}=C?$$\n\nWe formalise \"an infinite sequence of $n_i$\" as a strictly monotone sequence of indices\n`n : ℕ → ℕ`. Note that the numerator is the gap between the two *consecutive* primes\n$p_{n_i}$ and $p_{n_i+1}$, which is `primeGap (n i)`, and not the gap between the primes\nindexed by two consecutive members of the sequence.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_5 : ∀ C : ℝ, 0 ≤ C →\n    ∃ n : ℕ → ℕ, StrictMono n ∧ Tendsto (fun i => normalizedGap (n i)) atTop (𝓝 C) := by\n  sorry\n\n/--\nLet $S$ be the set of limit points of $(p_{n+1}-p_n)/\\log n$. This problem asks whether\n$S=[0,\\infty]$.\n\nSince $\\infty\\in S$ is known (see `erdos_5.variants.westzynthius`), the open content is the\nequality of the finite part of $S$ with $[0,\\infty)$.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_5.variants.limit_point_set : limitPointSet = Ici 0 := by\n  sorry\n\n/--\n$\\infty\\in S$ by Westzynthius' result [We31] on large prime gaps.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.westzynthius :\n    ∃ n : ℕ → ℕ, StrictMono n ∧ Tendsto (fun i => normalizedGap (n i)) atTop atTop := by\n  sorry\n\n/--\n$0\\in S$ by the work of Goldston, Pintz, and Yildirim [GPY09] on small prime gaps.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.goldston_pintz_yildirim : (0 : ℝ) ∈ limitPointSet := by\n  sorry\n\n/--\nErdős [Er55] and Ricci [Ri56] independently showed that $S$ has positive Lebesgue measure.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.erdos_ricci : 0 < volume limitPointSet := by\n  sorry\n\n/--\nHildebrand and Maier [HiMa88] showed that $S$ contains arbitrarily large (finite) numbers.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.hildebrand_maier : ∀ C : ℝ, ∃ x ∈ limitPointSet, C < x := by\n  sorry\n\n/--\n[HiMa88] in fact prove the stronger statement that there is a constant $c>0$ with\n$\\lambda([0,T]\\cap S)\\geq cT$ for all sufficiently large $T$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.hildebrand_maier_measure : ∃ c > (0 : ℝ), ∀ᶠ T : ℝ in atTop,\n    ENNReal.ofReal (c * T) ≤ volume (limitPointSet ∩ Icc 0 T) := by\n  sorry\n\n/--\nPintz [Pi16] showed that there exists some small constant $c>0$ such that $[0,c]\\subset S$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.pintz : ∃ c > (0 : ℝ), Icc 0 c ⊆ limitPointSet := by\n  sorry\n\n/--\nBanks, Freiberg, and Maynard [BFM16] showed that at least $12.5\\%$ of $[0,\\infty)$ belongs\nto $S$.\n\nThis is [BFM16, Theorem 1.1]: for any nine nonnegative reals\n$\\beta_1\\leq\\beta_2\\leq\\cdots\\leq\\beta_9$, at least one of the differences $\\beta_j-\\beta_i$\nwith $i<j$ belongs to $S$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.banks_freiberg_maynard (β : Fin 9 → ℝ) (hβ : ∀ i, 0 ≤ β i)\n    (hβmono : Monotone β) : ∃ i j, i < j ∧ β j - β i ∈ limitPointSet := by\n  sorry\n\n/--\nThe $12.5\\%$ claim itself, as deduced in [BFM16, Corollary 1.2]:\n$\\lambda([0,T]\\cap S)\\geq (1-o(1))T/8$ as $T\\to\\infty$.\n\nNote that the constant $1/8$ is only attained asymptotically and ineffectively; the bound\n[BFM16] obtain for *all* $T>0$ is the weaker $\\lambda([0,T]\\cap S)>T/22$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.banks_freiberg_maynard_measure : ∀ ε > (0 : ℝ), ∀ᶠ T : ℝ in atTop,\n    ENNReal.ofReal ((1 - ε) * T / 8) ≤ volume (limitPointSet ∩ Icc 0 T) := by\n  sorry\n\n/--\nMerikoski [Me20] showed that at least $1/3$ of $[0,\\infty)$ belongs to $S$.\n\nThis is [Me20, Theorem 1]: for any reals $\\beta_1\\leq\\beta_2\\leq\\beta_3\\leq\\beta_4$, at least\none of the differences $\\beta_j-\\beta_i$ with $i<j$ belongs to $S$. Note that, in contrast with\n`erdos_5.variants.banks_freiberg_maynard`, the $\\beta_i$ are not required to be nonnegative.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.merikoski (β : Fin 4 → ℝ) (hβmono : Monotone β) :\n    ∃ i j, i < j ∧ β j - β i ∈ limitPointSet := by\n  sorry\n\n/--\nThe $1/3$ claim itself [Me20, Corollary 2]: $\\lambda([0,T]\\cap S)\\geq T/3$ for all $T>0$.\n\nUnlike the $1/8$ of [BFM16], this bound holds uniformly in $T$ with no error term.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.merikoski_measure : ∀ T > (0 : ℝ),\n    ENNReal.ofReal (T / 3) ≤ volume (limitPointSet ∩ Icc 0 T) := by\n  sorry\n\n/--\nMerikoski [Me20] showed that $S$ has bounded gaps.\n\nThis is [Me20, Corollary 3]: there is a (ineffective) constant $C\\geq 0$ such that\n$S\\cap[T,T+C]\\neq\\emptyset$ for all $T\\geq 0$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_5.variants.merikoski_bounded_gaps :\n    ∃ C ≥ (0 : ℝ), ∀ T ≥ (0 : ℝ), (limitPointSet ∩ Icc T (T + C)).Nonempty := by\n  sorry\n\n/--\nIn [Er65b], [Er85c], and [Er97c] Erdős asks whether $S$ is everywhere dense (but Weisenberg\nnotes that clearly $S$ is closed so this is equivalent to asking whether $S=[0,\\infty]$).\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_5.variants.dense : Ici (0 : ℝ) ⊆ closure limitPointSet := by\n  sorry\n\n/--\nMembership in `limitPointSet` is exactly the existence of an infinite sequence of indices\nalong which the normalised prime gaps converge, as in the statement of `erdos_5`.\n-/\n@[category test, AMS 11]\ntheorem mem_limitPointSet_iff (x : ℝ) : x ∈ limitPointSet ↔\n    ∃ n : ℕ → ℕ, StrictMono n ∧ Tendsto (fun i => normalizedGap (n i)) atTop (𝓝 x) :=\n  ⟨fun hx => hx.tendsto_subseq, fun ⟨_n, hn, h⟩ => h.mapClusterPt.of_comp hn.tendsto_atTop⟩\n\n/-- The normalised prime gaps are nonnegative. -/\n@[category test, AMS 11]\ntheorem normalizedGap_nonneg (n : ℕ) : 0 ≤ normalizedGap n :=\n  div_nonneg (Nat.cast_nonneg _) (log_natCast_nonneg _)\n\n/-- Every limit point of the normalised prime gaps is nonnegative. -/\n@[category test, AMS 11]\ntheorem limitPointSet_subset_Ici : limitPointSet ⊆ Ici 0 := by\n  intro x hx\n  obtain ⟨n, -, h⟩ := (mem_limitPointSet_iff x).1 hx\n  exact ge_of_tendsto' h fun i => normalizedGap_nonneg (n i)\n\n/--\nThe statement of `erdos_5` is equivalent to the description of the set of limit points in\n`erdos_5.variants.limit_point_set`; combine with `mem_limitPointSet_iff` to unfold the\nmembership into the sequence of indices $n_i$.\n-/\n@[category test, AMS 11]\ntheorem erdos_5_iff_limit_point_set :\n    (∀ C : ℝ, 0 ≤ C → C ∈ limitPointSet) ↔ limitPointSet = Ici 0 :=\n  ⟨fun h => limitPointSet_subset_Ici.antisymm h, fun h _ hC => h ▸ hC⟩\n\n/--\nThe set $S$ of limit points is closed, as Weisenberg notes in the acknowledgements to\n[erdosproblems.com/5](https://www.erdosproblems.com/5); consequently `erdos_5.variants.dense`\nand `erdos_5.variants.limit_point_set` ask the same question.\n-/\n@[category test, AMS 11]\ntheorem isClosed_limitPointSet : IsClosed limitPointSet := isClosed_setOfPred_clusterPt\n\n/--\nWeisenberg's remark, as reported on [erdosproblems.com/5](https://www.erdosproblems.com/5):\nsince $S$ is closed, asking that $S$ be everywhere dense in $[0,\\infty)$ is the same as asking\nthat $S=[0,\\infty)$, so `erdos_5.variants.dense` and `erdos_5.variants.limit_point_set` pose the\nsame question.\n-/\n@[category test, AMS 11]\ntheorem dense_iff_limit_point_set :\n    Ici (0 : ℝ) ⊆ closure limitPointSet ↔ limitPointSet = Ici 0 := by\n  rw [isClosed_limitPointSet.closure_eq]\n  exact ⟨fun h => limitPointSet_subset_Ici.antisymm h, fun h => h.ge⟩\n\n-- See also Erdős Problem 234, which concerns the density of the integers `n` with\n-- `(p (n + 1) - p n) / log n < c`.\n\nend Erdos5\n",
  "statement_hash": "088a5128f150b159a764c44712a610262b3b7f3cf30643e5fa8159ac87014d31",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}