{
  "id": "2053",
  "ident": "NS.02053",
  "slug": "erdos-416",
  "title": "Erdős Problem 416",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable. Does `V(2x)/V(x)→2` ?\n\nYes. This was proved by an internal OpenAI model in September 2026 [OAI26a]; see the linked\nLean proof, which gives `V(cx)/V(x)→c` for every fixed `c>0`.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos416.erdos_416.parts.i",
  "statement_lean": "theorem erdos_416.parts.i :\n    Filter.Tendsto (fun x => (V (2 * x) / V (x))) Filter.atTop (𝓝 2)",
  "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 416\n\n*References:*\n- [erdosproblems.com/416](https://www.erdosproblems.com/416)\n- [OAI26a] OpenAI, *An asymptotic formula for the number of totients*. OpenAI Math Release\n  preprint (2026).\n  https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/An-asymptotic-formula-for-the-number-of-totients-September-25-2026/An-asymptotic-formula-for-the-number-of-totients-September-25-2026.pdf\n-/\n\n@[expose] public section\n\nopen Filter\nopen scoped Topology Real\n\nnamespace Erdos416\n\n/-- Let `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable. -/\nnoncomputable abbrev V (x : ℝ) : ℝ :=\n  open scoped Classical in\n  (Finset.Icc 1 ⌊x⌋₊ |>.filter (fun n => ∃ (m : ℕ), m.totient = n)).card\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable. Does `V(2x)/V(x)→2` ?\n\nYes. This was proved by an internal OpenAI model in September 2026 [OAI26a]; see the linked\nLean proof, which gives `V(cx)/V(x)→c` for every fixed `c>0`.\n-/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/NumberTheory/TotientAsymptotic/UnconditionalMain.lean#L12\"]\ntheorem erdos_416.parts.i :\n    Filter.Tendsto (fun x => (V (2 * x) / V (x))) Filter.atTop (𝓝 2) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable. Then `V(cx)/V(x)→c` for\nevery fixed `c>0`, which answers a question of Erdős and Hall. This was proved by an internal\nOpenAI model in September 2026 [OAI26a]; see the linked Lean proof.\n-/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/NumberTheory/TotientAsymptotic/UnconditionalMain.lean#L12\"]\ntheorem erdos_416.variants.regularly_varying (c : ℝ) (hc : 0 < c) :\n    Filter.Tendsto (fun x => V (c * x) / V x) Filter.atTop (𝓝 c) := by\n  sorry\n\ndef erdos_416.parts.ii.answer : ℝ → ℝ := sorry\n\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable.\nIs there an asymptotic formula for `V(x)`?\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_416.parts.ii :\n    Filter.Tendsto (fun x => V x / erdos_416.parts.ii.answer x) atTop (𝓝 1) := by\n  sorry\n\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable.\nPillai proved `V(x)=o(x)`.\nRef: S. Sivasankaranarayana Pillai, _On some functions connected with $\\phi(n)$_\n-/\n@[category research solved, AMS 11]\ntheorem erdos_416.variants.Pillai : V =o[atTop] id := by\n  sorry\n\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable.\nErdős proved V(x)=x(logx)^(−1+o(1)).\nRef: Erdős, P., _On the normal number of prime factors of $p-1$ and some related problems concerning Euler's $\\varphi$-function._\n-/\n@[category research solved, AMS 11]\ntheorem erdos_416.variants.Erdos : ∃ f : ℝ → ℝ, f =o[atTop] (1 : ℝ → ℝ) ∧\n    ∀ᶠ x in Filter.atTop, V x = x * x.log ^ (-1 + f x) := by\n  sorry\n\n-- TODO: define the constant from the paper, 0.8178146... here and add it in the statement\ndef erdos_416.variants.Maier_Pomerance.answer : ℝ := sorry\n\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable.\n`V(x)=x/logx * e^((C+o(1))(log log log x)^2)`, for some explicit constant `C>0`.\nRef:Maier, Helmut and Pomerance, Carl, _On the number of distinct values of Euler's $\\phi$-function_.\n-/\n@[category research solved, question value, AMS 11]\ntheorem erdos_416.variants.Maier_Pomerance :\n    0 < erdos_416.variants.Maier_Pomerance.answer ∧ ∃ f : ℝ → ℝ, f =o[atTop] (1 : ℝ → ℝ) ∧\n      ∀ᶠ x in Filter.atTop, (V x : ℝ) = x / x.log *\n        (rexp <| (erdos_416.variants.Maier_Pomerance.answer + f x) * x.log.log.log ^ 2) := by\n  sorry\n\n-- TODO: add the constants `C₁, C₂, C₃` from the paper here\ndef erdos_416.variants.Ford.answer : ℝ × ℝ × ℝ := sorry\n\n/--\nLet `V(x)` count the number of `n≤x` such that `ϕ(m)=n` is solvable.\n`V(x) ≍ x/log x*e^(C_1*(log log log x − log log log log x)^2+C_2 log log log x − C_3 log log log log x)`\nRef: Ford, Kevin, _The distribution of totients_.\n-/\n@[category research solved, question value, AMS 11]\ntheorem erdos_416.variants.Ford :\n    let (C₁, C₂, C₃) : ℝ × ℝ × ℝ := erdos_416.variants.Ford.answer\n    0 < C₁ ∧ 0 < C₂ ∧ 0 < C₃ ∧\n    let G (x : ℝ) : ℝ := x / x.log * (rexp <| C₁ * (x.log.log.log - x.log.log.log.log) ^ 2\n        + C₂* x.log.log.log - C₃ * x.log.log.log.log)\n    V =Θ[atTop] G := by\n  sorry\n\nend Erdos416\n",
  "statement_hash": "02f29b086d454f5e28d9fdfef61368e0b316bb2e71eadd6b4d70180d5a1a2c6a",
  "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."
}