{
  "id": "3801",
  "ident": "NS.03801",
  "slug": "erdos-968",
  "title": "Erdős Problem 968",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Does the set `{n | u n < u (n+1)}` have positive lower density?\n\nYes. This was proved by an internal OpenAI model in September 2026 [OAI26a]; see the linked\nLean proof.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/968",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos968.erdos_968",
  "statement_lean": "theorem erdos_968 : 0 < {n : ℕ | u n < u (n + 1)}.lowerDensity",
  "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 968\n\nLet `uₙ = pₙ / n`, where `pₙ` is the `n`th prime. Does the set of `n` such that `uₙ < uₙ₊₁`\nhave positive lower density?\n\nErdős and Prachar also proved that `∑_{pₙ < x} |uₙ₊₁ - uₙ| ≍ (log x)^2`, and that the set of `n`\nsuch that `uₙ > uₙ₊₁` has positive lower density. Erdős also asked whether there are infinitely many\nincreasing triples `uₙ < uₙ₊₁ < uₙ₊₂` or decreasing triples `uₙ > uₙ₊₁ > uₙ₊₂`.\n\n*Reference:* [erdosproblems.com/968](https://www.erdosproblems.com/968)\n\n[ErPr61] Erdős, P. and Prachar, K., _Sätze und Probleme über pₖ/k_. Abh. Math. Sem. Univ. Hamburg\n(1961/62), 251–256.\n\n[FMT18] Ford, K. and Maynard, J. and Tao, T., _Chains of large gaps between primes_. Irregularities\nin the distribution of prime numbers, Springer (2018), 1–21.\n\n[Ma15] Maynard, J., _Small gaps between primes_. Ann. of Math. (2015), 383–413.\n\n[OAI26a] OpenAI, _Positive lower density of large prime gaps_. OpenAI Math Release preprint (2026).\nhttps://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Positive-lower-density-of-large-prime-gaps-September-25-2026/main.pdf\n-/\n\n@[expose] public section\n\nopen Filter Real\nopen scoped BigOperators\n\nnamespace Erdos968\n\n/--\n`u n` is the normalized `n`th prime, defined as `pₙ / (n+1)` where `pₙ` is the `n`th prime\n(with `0.nth Nat.Prime = 2`).\n\nThis corresponds to the classical sequence `(p₁/1, p₂/2, p₃/3, ...)` while using `Nat.nth Prime`'s\n`0`-based indexing; in particular, the denominator is always positive.\n-/\nnoncomputable def u (n : ℕ) : ℝ :=\n  (n.nth Nat.Prime : ℝ) / (n + 1)\n\nset_option linter.style.formal_proof_palomar false in\n/--\nDoes the set `{n | u n < u (n+1)}` have positive lower density?\n\nYes. This was proved by an internal OpenAI model in September 2026 [OAI26a]; see the linked\nLean proof.\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at\n  \"https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/NumberTheory/PrimeGaps/RatioCorollary.lean#L30\"]\ntheorem erdos_968 : 0 < {n : ℕ | u n < u (n + 1)}.lowerDensity := by\n  sorry\n\n/--\nErdős and Prachar proved `∑_{pₙ < x} |u (n+1) - u n| ≍ (log x)^2` (see [ErPr61]).\n\nWe encode `∑_{pₙ < x}` as a sum over `n < Nat.primeCounting' x` (the number of primes `< x`).\n-/\n@[category research solved, AMS 11]\ntheorem erdos_968.variants.sum_abs_diff_isTheta_log_sq :\n    (fun x : ℕ =>\n        ∑ n < Nat.primeCounting' x, |u (n + 1) - u n|) =Θ[atTop]\n      fun x : ℕ => log x ^ 2 := by\n  sorry\n\n/--\nErdős and Prachar proved that the set `{n | u n > u (n+1)}` has positive lower density\n(see [ErPr61]).\n-/\n@[category research solved, AMS 11]\ntheorem erdos_968.variants.decreasing_steps_pos_lower_density :\n    0 < {n : ℕ | u n > u (n + 1)}.lowerDensity := by\n  sorry\n\n/--\nErdős asked whether there are infinitely many solutions to `uₙ < uₙ₊₁ < uₙ₊₂`.\n\nThe answer is yes. Since `uₙ < uₙ₊₁` is equivalent to `pₙ₊₁ - pₙ > pₙ / n`, it suffices to have\ninfinitely many `n` with two consecutive prime gaps larger than `pₙ / n ∼ log n`. Ford, Maynard,\nand Tao [FMT18] proved that for every fixed `k` there are infinitely many `n` with `k` consecutive\nprime gaps all of size `≫ log pₙ · log log pₙ · log log log log pₙ / log log log pₙ`.\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_968.variants.infinite_increasingTriples :\n    {n : ℕ | u n < u (n + 1) ∧ u (n + 1) < u (n + 2)}.Infinite := by\n  sorry\n\n/--\nErdős asked whether there are infinitely many solutions to `uₙ > uₙ₊₁ > uₙ₊₂`.\n\nThe answer is yes. Since `uₙ > uₙ₊₁` is equivalent to `pₙ₊₁ - pₙ < pₙ / n`, it suffices to have\ninfinitely many `n` with `pₙ₊₂ - pₙ` bounded, because `pₙ / n → ∞`. Maynard [Ma15] proved that\n`liminf (pₙ₊₂ - pₙ) < ∞`.\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_968.variants.infinite_decreasingTriples :\n    {n : ℕ | u n > u (n + 1) ∧ u (n + 1) > u (n + 2)}.Infinite := by\n  sorry\n\nend Erdos968\n",
  "statement_hash": "b243a34a929242adfaab59559a84d7b8c55a9f6f93236e519efc758ca71f7912",
  "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."
}