{
  "id": "576",
  "ident": "NS.00576",
  "slug": "erdos-1072",
  "title": "Erdős Problem 1072",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Is it true that there are infinitely many $p$ for which $f(p) = p − 1$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/1072",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1072.erdos_1072.parts.i",
  "statement_lean": "theorem erdos_1072.parts.i : Set.Infinite {p | p.Prime ∧ f p = p - 1}",
  "challenge_source": "/-\nCopyright 2025 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 1072\n\n*Reference:* [erdosproblems.com/1072](https://www.erdosproblems.com/1072)\n-/\n\n@[expose] public section\n\nopen Nat Filter Finset Set\nopen scoped Topology\n\nnamespace Erdos1072\n\n/-- For any prime $p$, let $f(p)$ be the least integer such that $f(p)! + 1 \\equiv 0 \\mod p$. -/\nnoncomputable def f (p : ℕ) : ℕ := sInf {n | (n)! + 1 ≡ 0 [MOD p]}\n\n/-- Is it true that there are infinitely many $p$ for which $f(p) = p − 1$? -/\n@[category research open, question, AMS 11]\ntheorem erdos_1072.parts.i : Set.Infinite {p | p.Prime ∧ f p = p - 1} := by\n  sorry\n\n/-- Is it true that $f(p)/p \\to 0$ for $p \\to \\infty$ in a density 1 subset of the primes? -/\n@[category research open, question, AMS 11]\ntheorem erdos_1072.parts.ii :\n    ∃ (P : Set ℕ), P ⊆ {p | p.Prime} ∧ P.HasDensity 1 {p | p.Prime} ∧\n      Tendsto (fun p => (f p / p : ℝ)) (atTop ⊓ principal P) (𝓝 0) := by\n  sorry\n/--\nErdős, Hardy, and Subbarao [HaSu02], believed that the number of $p \\le x$ for which $f(p)=p−1$\nis $o(x/\\log x)$.\n\n[HaSu02] Hardy, G. E. and Subbarao, M. V., _A modified problem of Pillai and some related questions._\nAmer. Math. Monthly (2002), 554--559.\n-/\n@[category research open, AMS 11]\ntheorem erdos_1072.variants.littleo :\n    (fun x ↦ (({p | p.Prime ∧ f p = p - 1} ∩ Icc 0 x).ncard : ℝ)) =o[atTop]\n      (fun x ↦ x / Real.log x) := by\n  sorry\n\nend Erdos1072\n",
  "statement_hash": "1cf22de95fddc0b49d779c7009e3011bde6a26ad08c1855c114435fce277af09",
  "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."
}