{
  "id": "2177",
  "ident": "NS.02177",
  "slug": "erdos-448",
  "title": "Erdős Problem 448",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $\\tau(n)$ count the divisors of $n$ and $\\tau^+(n)$ count the number of $k$ such that $n$ has a\ndivisor in $[2^k, 2^{k+1})$. Is it true that, for all $\\epsilon > 0$,\n$$ \\tau^+(n) < \\epsilon \\cdot \\tau(n) $$\nfor almost all $n$?\n\nThis is false, and was disproved by Erdős and Tenenbaum [ErTe81], who showed that in fact the upper\ndensity of the set of such $n$ is $\\asymp \\epsilon^{1-o(1)}$ (where the $o(1)$ in the exponent\n$\\to 0$ as $\\epsilon \\to 0$). A more precise result was proved by Hall and Tenenbaum [HaTe88]\n(see Section 4.6), who showed that the upper density is $\\ll \\epsilon \\log(2/\\epsilon)$. Hall and\nTenenbaum further prove that $\\tau^+(n)/\\tau(n)$ has a distribution function. Erdős and Graham also\nasked whether there is a good inequality known for $\\sum_{n \\leq x} \\tau^+(n)$. This was provided by\nFord [Fo08] who proved\n$$ \\sum_{n \\leq x} \\tau^+(n) \\asymp x\\frac{(\\log x)^{1-\\alpha}}{(\\log\\log x)^{3/2}} $$\nwhere\n$$ \\alpha = 1-\\frac{1+\\log\\log 2}{\\log 2} = 0.08607\\cdots. $$",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos448.erdos_448",
  "statement_lean": "theorem erdos_448 :\n    ¬ ∀ ε : ℝ, 0 < ε →\n      {n : ℕ | (tauPlus n : ℝ) < ε * (n.divisors.card : ℝ)}.HasDensity 1",
  "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 448\n\n*References:*\n- [erdosproblems.com/448](https://www.erdosproblems.com/448)\n- [OEIS A397433](https://oeis.org/A397433): the integer sequence $\\tau^+(n)$\n  (the constant $\\alpha$ in Ford's asymptotic is [OEIS A074738](https://oeis.org/A074738)).\n- [Er79] Erdős, Paul, Some unconventional problems in number theory. Math. Mag. (1979), 67-70.\n- [Er79e] Erdős, Paul, Some unconventional problems in number theory. Astérisque (1979), 73-82.\n- [HaTe88] Hall, Richard R. and Tenenbaum, Gérald, Divisors. (1988), xvi+167.\n- [ErTe81] Erdős, P., Tenenbaum, G., *Sur la structure de la suite des diviseurs d'un entier.*\n  Ann. Inst. Fourier (Grenoble) **31** (1981), 17–37.\n- [Fo08] Ford, Kevin, *The distribution of integers with a divisor in a given interval.*\n  Ann. of Math. (2) **168** (2008), 367–433.\n- [Te13] Tenenbaum, Gérald, *Some of Erdős' unconventional problems in number theory, thirty-four\n  years later.* Erdős Centennial, Bolyai Soc. Math. Stud. **25** (2013), 651–681.\n-/\n\n@[expose] public section\n\nnamespace Erdos448\n\nopen Filter Asymptotics Topology\n\n/-- `tauPlus n` (written $\\tau^+(n)$) counts the number of $k$ such that $n$ has a divisor in\n$[2^k, 2^{k+1})$. Equivalently, the number of distinct values $\\lfloor \\log_2 d \\rfloor$ as $d$\nranges over the divisors of $n$: a divisor $d$ lies in $[2^k, 2^{k+1})$ iff `Nat.log 2 d = k`. -/\ndef tauPlus (n : ℕ) : ℕ := (n.divisors.image (Nat.log 2)).card\n\n/-- Sanity check: $\\tau^+(6) = 3$. Divisors $1, 2, 3, 6$ lie in dyadic blocks $k = 0, 1, 1, 2$,\nso the distinct blocks are $\\{0, 1, 2\\}$. ($\\tau(6) = 4$.) -/\n@[category test, AMS 11]\ntheorem tauPlus_six : tauPlus 6 = 3 := by decide\n\n/-- Sanity check: $\\tau^+(12) = 4$. Divisors $1, 2, 3, 4, 6, 12$ lie in dyadic blocks\n$k = 0, 1, 1, 2, 2, 3$, so the distinct blocks are $\\{0, 1, 2, 3\\}$. ($\\tau(12) = 6$.) -/\n@[category test, AMS 11]\ntheorem tauPlus_twelve : tauPlus 12 = 4 := by decide\n\n/-- Always $\\tau^+(n) \\le \\tau(n)$: the occupied dyadic blocks are the image of the divisor set\nunder `Nat.log 2`, and an image has at most as many elements as its source. This is what makes the\n$\\epsilon < 1$ comparison in the problem meaningful. -/\n@[category test, AMS 11]\ntheorem tauPlus_le_tau (n : ℕ) : tauPlus n ≤ n.divisors.card :=\n  Finset.card_image_le\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $\\tau(n)$ count the divisors of $n$ and $\\tau^+(n)$ count the number of $k$ such that $n$ has a\ndivisor in $[2^k, 2^{k+1})$. Is it true that, for all $\\epsilon > 0$,\n$$ \\tau^+(n) < \\epsilon \\cdot \\tau(n) $$\nfor almost all $n$?\n\nThis is false, and was disproved by Erdős and Tenenbaum [ErTe81], who showed that in fact the upper\ndensity of the set of such $n$ is $\\asymp \\epsilon^{1-o(1)}$ (where the $o(1)$ in the exponent\n$\\to 0$ as $\\epsilon \\to 0$). A more precise result was proved by Hall and Tenenbaum [HaTe88]\n(see Section 4.6), who showed that the upper density is $\\ll \\epsilon \\log(2/\\epsilon)$. Hall and\nTenenbaum further prove that $\\tau^+(n)/\\tau(n)$ has a distribution function. Erdős and Graham also\nasked whether there is a good inequality known for $\\sum_{n \\leq x} \\tau^+(n)$. This was provided by\nFord [Fo08] who proved\n$$ \\sum_{n \\leq x} \\tau^+(n) \\asymp x\\frac{(\\log x)^{1-\\alpha}}{(\\log\\log x)^{3/2}} $$\nwhere\n$$ \\alpha = 1-\\frac{1+\\log\\log 2}{\\log 2} = 0.08607\\cdots. $$\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos448.lean#L35\"]\ntheorem erdos_448 :\n    ¬ ∀ ε : ℝ, 0 < ε →\n      {n : ℕ | (tauPlus n : ℝ) < ε * (n.divisors.card : ℝ)}.HasDensity 1 := by\n  sorry\n\n/--\nQuantitative form of the (negative) answer to `erdos_448`. Erdős and Tenenbaum [ErTe81] showed that\nthe upper density of $\\{n : \\tau^+(n) < \\epsilon \\cdot \\tau(n)\\}$ is in fact\n$\\asymp \\epsilon^{1 - o(1)}$, where the $o(1)$ in the exponent tends to $0$ as $\\epsilon \\to 0$.\nEquivalently, $\\log(\\text{upper density}) / \\log \\epsilon \\to 1$ as $\\epsilon \\to 0^+$. -/\n@[category research solved, AMS 11]\ntheorem erdos_448.variants.erdos_tenenbaum :\n    Tendsto\n      (fun ε : ℝ =>\n        Real.log ({n : ℕ | (tauPlus n : ℝ) < ε * (n.divisors.card : ℝ)}.upperDensity) / Real.log ε)\n      (𝓝[>] (0 : ℝ)) (𝓝 (1 : ℝ)) := by\n  sorry\n\n/--\nA more precise result of Hall and Tenenbaum [HaTe88, §4.6]: the upper density of\n$\\{n : \\tau^+(n) < \\epsilon \\cdot \\tau(n)\\}$ is $\\ll \\epsilon \\cdot \\log(2/\\epsilon)$ as\n$\\epsilon \\to 0^+$. -/\n@[category research solved, AMS 11]\ntheorem erdos_448.variants.hall_tenenbaum_upper_bound :\n    (fun ε : ℝ => ({n : ℕ | (tauPlus n : ℝ) < ε * (n.divisors.card : ℝ)}).upperDensity)\n      =O[𝓝[>] (0 : ℝ)] (fun ε : ℝ => ε * Real.log (2 / ε)) := by\n  sorry\n\n/--\nHall and Tenenbaum [HaTe88] further prove that $\\tau^+(n)/\\tau(n)$ has a distribution function:\nthere is a distribution function `F` (non-decreasing, with $F(-\\infty) = 0$ and $F(+\\infty) = 1$)\nsuch that, for every continuity point $z$ of `F`, the set $\\{n : \\tau^+(n)/\\tau(n) \\le z\\}$ has\ndensity `F z`. Tenenbaum [Te13] proved that `F` is continuous at $z = 1$ and asked to determine\nits discontinuity points, if any. -/\n@[category research solved, AMS 11]\ntheorem erdos_448.variants.hall_tenenbaum_distribution :\n    ∃ F : ℝ → ℝ, Monotone F ∧ Tendsto F atBot (𝓝 0) ∧ Tendsto F atTop (𝓝 1) ∧\n      ∀ z : ℝ, ContinuousAt F z →\n        {n : ℕ | (tauPlus n : ℝ) / (n.divisors.card : ℝ) ≤ z}.HasDensity (F z) := by\n  sorry\n\n/--\nErdős and Graham asked whether there is a good inequality for $\\sum_{n \\le x} \\tau^+(n)$. This was\nanswered by Ford [Fo08], who proved\n$$ \\sum_{n \\le x} \\tau^+(n) \\asymp x \\cdot \\frac{(\\log x)^{1 - \\alpha}}{(\\log\\log x)^{3/2}}, $$\nwhere $\\alpha = 1 - \\frac{1 + \\log\\log 2}{\\log 2} = 0.08607\\ldots$. -/\n@[category research solved, AMS 11]\ntheorem erdos_448.variants.ford :\n    (fun x : ℕ => ∑ n ∈ Finset.Icc 1 x, (tauPlus n : ℝ))\n      =Θ[atTop]\n      (fun x : ℕ =>\n        let α : ℝ := 1 - (1 + Real.log (Real.log 2)) / Real.log 2\n        (x : ℝ) * Real.log (x : ℝ) ^ (1 - α)\n          / Real.log (Real.log (x : ℝ)) ^ ((3 : ℝ) / 2)) := by\n  sorry\n\nend Erdos448\n",
  "statement_hash": "61f634d353f59e7fae4869f51642cad9fd803645c94203d9faeb80f039c6edd7",
  "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."
}