{
  "id": "3137",
  "ident": "NS.03137",
  "slug": "erdos-770",
  "title": "Erdős Problem 770",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "For every prime `p`, does the density of integers with `h n = p` exist?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos770.erdos_770.parts.i",
  "statement_lean": "theorem erdos_770.parts.i : ∀ p : ℕ, p.Prime → ∃ a, HasDensity {n | h n = p} a",
  "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 770\n\n*References:*\n - [erdosproblems.com/770](https://www.erdosproblems.com/770)\n - [Er49d] Erdös, P. \"On the strong law of large numbers.\" Transactions of the American Mathematical\n    Society 67.1 (1949): 51-56.\n - [Ma66] Matsuyama, Noboru. \"On the strong law of large numbers.\" Tohoku Mathematical Journal,\n    Second Series 18.3 (1966): 259-269.\n-/\n\n@[expose] public section\n\nopen Set ENat Filter\n\nnamespace Erdos770\n\n\n/-- Let $h n$ be the minimal number such that $2 ^ n - 1, \\dots, h(n) ^ n - 1$\nare collectively coprime. -/\nnoncomputable def h (n : ℕ) : ℕ∞ := sInf {m | 2 < m ∧\n  ((Finset.Icc 2 m.toNat).image fun i => (i ^ n - 1)).gcd id = 1}\n\n/-- `n + 1` is prime iff `h n = n + 1`. This is described as 'easy to see' in [Er74b]. -/\n@[category textbook, AMS 11]\ntheorem Nat.Prime.h_eq_add_one {n : ℕ} (hn : 2 < n) : h n = n + 1 ↔ (n + 1).Prime := by\n  sorry\n\n/-- For odd `n`, the values of `h n` form an unbounded set.\nThis is described as 'easy to see' in [Er74b]. -/\n@[category textbook, AMS 11]\ntheorem erdos_770.variants.odd_h_unbounded : Unbounded (· ≤ ·) (ENat.toNat '' (h '' Odd)):= by\n  sorry\n\n\n/-- For every prime `p`, does the density of integers with `h n = p` exist? -/\n@[category research open, question, AMS 11]\ntheorem erdos_770.parts.i : ∀ p : ℕ, p.Prime → ∃ a, HasDensity {n | h n = p} a := by\n  sorry\n\n/-- Does `liminf h n = ∞`? -/\n@[category research open, question, AMS 11]\ntheorem erdos_770.parts.ii : liminf h atTop = ⊤ := by\n  sorry\n\n/-- Is it true that if `p` is the greatest prime such that `p - 1 ∣ n` and `p > n ^ ε`, then\n`h n = p`? -/\n@[category research open, question, AMS 11]\ntheorem erdos_770.parts.iii : ∀ ε > 0, ∀ᶠ n in atTop,\n    let p := sSup {m : ℕ | m.Prime ∧ m - 1 ∣ n}\n    p > (n : ℝ) ^ (ε : ℝ) → h n = p := by\n  sorry\n\n/-- It is probably true that `h n = 3` for infinitely many `n`. -/\n@[category research open, AMS 11]\ntheorem erdos_770.variants.three : {n | h n = 3}.Infinite := by\n  sorry\n\nend Erdos770\n",
  "statement_hash": "57cdd02b7ef0a14f4b7f708099be8cad2d595de661814fbd2152524e3911f241",
  "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."
}