{
  "id": "2891",
  "ident": "NS.02891",
  "slug": "erdos-694",
  "title": "Erdős Problem 694",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $f_\\max(n)$ be the largest $m$ such that $\\phi(m) = n$, and\n$f_\\min(n)$ be the smallest such $m$, where $\\phi$ is Euler's\ntotient function. Investigate\n$$\n  \\max_{n\\leq x}\\frac{f_\\max(n)}{f_\\min(n)}.\n$$\n\nGPT-5.5 Pro (prompted by Price) has proved (see also the comments for a summary) that\n$$\n\\max_{n\\leq x}\\frac{f_{\\max}(n)}{f_{\\min}(n)}=(e^\\gamma+o(1))\\log\\log x.\n$$\n\nA Lean formalisation of the reduction exists, conditional on Mertens' product theorem and\nLinnik's theorem; see the\n[formal proof](https://github.com/Shashi456/erdos-formalizations/blob/main/Erdos/P694/Proof.lean).\n\nThe extrema are only required on nonempty fibres of the totient (values such as $3$ have no\npreimage), and the identity is asked for sufficiently large $x$: at $x = 1$ the maximum is\n$f_\\max(1) / f_\\min(1) = 2$ while $\\log \\log 1 = 0$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/694",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos694.erdos_694",
  "statement_lean": "theorem erdos_694 : ∀ᵉ (fmax : ℕ → ℕ) (fmin : ℕ → ℕ),\n      (∀ n, (∃ m, Nat.totient m = n) → IsGreatest (Nat.totient ⁻¹' {n}) (fmax n)) →\n      (∀ n, (∃ m, Nat.totient m = n) → IsLeast (Nat.totient ⁻¹' {n}) (fmin n)) →\n      ∃ o : ℕ → ℝ, Tendsto o atTop (𝓝 0) ∧\n        ∀ᶠ x : ℕ in atTop,\n          sSup { (fmax n : ℝ) / fmin n | (n : ℕ) (_ : n ≤ x) (_ : ∃ m, Nat.totient m = n) } =\n            (exp eulerMascheroniConstant + o x) * log (log (x : ℝ))",
  "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 694\n\n*Reference:* [erdosproblems.com/694](https://www.erdosproblems.com/694)\n-/\n\n@[expose] public section\n\nnamespace Erdos694\n\nopen Filter Topology Real\n\n/--\nLet $f_\\max(n)$ be the largest $m$ such that $\\phi(m) = n$, and\n$f_\\min(n)$ be the smallest such $m$, where $\\phi$ is Euler's\ntotient function. Investigate\n$$\n  \\max_{n\\leq x}\\frac{f_\\max(n)}{f_\\min(n)}.\n$$\n\nGPT-5.5 Pro (prompted by Price) has proved (see also the comments for a summary) that\n$$\n\\max_{n\\leq x}\\frac{f_{\\max}(n)}{f_{\\min}(n)}=(e^\\gamma+o(1))\\log\\log x.\n$$\n\nA Lean formalisation of the reduction exists, conditional on Mertens' product theorem and\nLinnik's theorem; see the\n[formal proof](https://github.com/Shashi456/erdos-formalizations/blob/main/Erdos/P694/Proof.lean).\n\nThe extrema are only required on nonempty fibres of the totient (values such as $3$ have no\npreimage), and the identity is asked for sufficiently large $x$: at $x = 1$ the maximum is\n$f_\\max(1) / f_\\min(1) = 2$ while $\\log \\log 1 = 0$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_694 : ∀ᵉ (fmax : ℕ → ℕ) (fmin : ℕ → ℕ),\n      (∀ n, (∃ m, Nat.totient m = n) → IsGreatest (Nat.totient ⁻¹' {n}) (fmax n)) →\n      (∀ n, (∃ m, Nat.totient m = n) → IsLeast (Nat.totient ⁻¹' {n}) (fmin n)) →\n      ∃ o : ℕ → ℝ, Tendsto o atTop (𝓝 0) ∧\n        ∀ᶠ x : ℕ in atTop,\n          sSup { (fmax n : ℝ) / fmin n | (n : ℕ) (_ : n ≤ x) (_ : ∃ m, Nat.totient m = n) } =\n            (exp eulerMascheroniConstant + o x) * log (log (x : ℝ)) := by\n  sorry\n\n/--\nCarmichael has asked whether there is an integer $n$ for which $\\phi(m) = n$ has\nexactly one solution, that is $\\frac{f_\\max(n)}{f_\\min(n)} = 1$.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_694.variants.carmichael :\n    ∃ n > 0, ∃! m, Nat.totient m = n := by\n  sorry\n\n/--\nErdős has proved that if there exists an integer $n$ for which $\\phi(m) = n$ has\nexactly one solution, then there must be infinitely many such $n$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_694.variants.inf_unique (h : ∃ n > 0, ∃! m, Nat.totient m = n) :\n    { n | ∃! m, Nat.totient m = n }.Infinite := by\n  sorry\n\nend Erdos694\n",
  "statement_hash": "064c81ee13f0cdac8a42d4e184dbdf44131d9b9a51491ca76f365b98a5f6e3b9",
  "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."
}