{
  "id": "1220",
  "ident": "NS.01220",
  "slug": "erdos-18",
  "title": "Erdős Problem 18",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "**Conjecture 1.**\nAre there infinitely many practical numbers $m$ such that $h(m) < (\\log \\log m)^{O(1)}$?\n\nMore precisely: does there exist a constant $C > 0$ such that for infinitely many\npractical numbers $m$, we have $h(m) < (\\log \\log m)^C$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos18.erdos_18a",
  "statement_lean": "theorem erdos_18a :\n    ∃ C : ℝ, 0 < C ∧ ∃ᶠ m in atTop, Nat.IsPractical m ∧\n      (practicalH m : ℝ) < (log (log m)) ^ C",
  "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 18\n\n*Reference:*\n* [erdosproblems.com/18](https://www.erdosproblems.com/18)\n* [ErGr80] Erdős, P. and Graham, R. L. (1980). Old and New Problems and Results in Combinatorial Number\nTheory. Monographies de L'Enseignement Mathématique, 28. Université de Genève. (See the\nsections on Egyptian fractions or practical numbers).\n* [Vo85] Vose, Michael D., Egyptian fractions. Bull. London Math. Soc. (1985), 21-24.\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics Real\n\nnamespace Erdos18\n\n/-- For a practical number $n$, $h(n)$ is the maximum over all $1 ≤ m ≤ n$ of\nthe minimum number of divisors of $n$ needed to represent $m$ as a sum of\ndistinct divisors. -/\nnoncomputable def practicalH (n : ℕ) : ℕ :=\n  Finset.sup (Finset.Icc 1 n) fun m =>\n    sInf {k | ∃ D : Finset ℕ, D ⊆ n.divisors ∧ D.card = k ∧ m ∈ subsetSums D}\n\n/- ### Examples for `practicalH` -/\n\n/-- $h(1) = 1$: we need the single divisor {1} to represent 1. -/\n@[category test, AMS 11]\ntheorem practicalH_one : practicalH 1 = 1 := by\n  norm_num [subsetSums, practicalH]\n\n/-- $h(2) = 1$: divisors are {1, 2}, each of m=1,2 needs only 1 divisor. -/\n@[category test, AMS 11]\ntheorem practicalH_two : practicalH 2 = 1 := by\n  simp only [practicalH, (by decide : Finset.Icc 1 2 = ({1, 2} : Finset ℕ)),\n    (by decide : Nat.divisors 2 = ({1, 2} : Finset ℕ)), Finset.sup_insert, Finset.sup_singleton]\n  have h1 : sInf {k | ∃ D : Finset ℕ, D ⊆ {1, 2} ∧ D.card = k ∧ 1 ∈ subsetSums D} = 1 :=\n    le_antisymm (Nat.sInf_le ⟨{1}, by simp, rfl, {1}, rfl.subset, by simp⟩)\n      (le_csInf ⟨1, {1}, by simp, rfl, {1}, rfl.subset, by simp⟩ fun k ⟨D, _, hD, B, hB, hm⟩ =>\n        hD ▸ Finset.one_le_card.mpr ((Finset.nonempty_iff_ne_empty.mpr fun h => by simp [h] at hm).mono hB))\n  have h2 : sInf {k | ∃ D : Finset ℕ, D ⊆ {1, 2} ∧ D.card = k ∧ 2 ∈ subsetSums D} = 1 :=\n    le_antisymm (Nat.sInf_le ⟨{2}, by simp, rfl, {2}, rfl.subset, by simp⟩)\n      (le_csInf ⟨1, {2}, by simp, rfl, {2}, rfl.subset, by simp⟩ fun k ⟨D, _, hD, B, hB, hm⟩ =>\n        hD ▸ Finset.one_le_card.mpr ((Finset.nonempty_iff_ne_empty.mpr fun h => by simp [h] at hm).mono hB))\n  simp [h1, h2]\n\n/-- $h(6) = 2$: divisors are {1, 2, 3, 6}. The hardest m to represent is\nm=4 or m=5, each requiring 2 divisors: 4=1+3, 5=2+3. -/\n@[category test, AMS 11]\ntheorem practicalH_six : practicalH 6 = 2 := by\n  have hdiv : Nat.divisors 6 = ({1, 2, 3, 6} : Finset ℕ) := by decide\n  apply le_antisymm\n  · -- practicalH 6 ≤ 2 : each m in [1,6] is a sum of at most two divisors of 6.\n    apply Finset.sup_le\n    intro m hm\n    rw [Finset.mem_Icc] at hm\n    obtain ⟨hm1, hm2⟩ := hm\n    interval_cases m\n    · exact Nat.sInf_le ⟨{1, 2}, by rw [hdiv]; decide, by decide, {1}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 2}, by rw [hdiv]; decide, by decide, {2}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 2}, by rw [hdiv]; decide, by decide, {1, 2}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 3}, by rw [hdiv]; decide, by decide, {1, 3}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{2, 3}, by rw [hdiv]; decide, by decide, {2, 3}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 6}, by rw [hdiv]; decide, by decide, {6}, by simp, by decide⟩\n  · -- 2 ≤ practicalH 6, witnessed by m = 4 (which needs two divisors: 4 = 1 + 3).\n    have h4 : (4 : ℕ) ∈ Finset.Icc 1 6 := by decide\n    refine le_trans ?_ (Finset.le_sup h4)\n    apply le_csInf\n    · exact ⟨2, {1, 3}, by rw [hdiv]; decide, by decide, {1, 3}, by simp, by decide⟩\n    · rintro k ⟨D, hDsub, hDcard, B, hBsub, hBsum⟩\n      by_contra! hk\n      interval_cases k\n      · -- D.card = 0 : D = ∅, so B = ∅ and the sum is 0 ≠ 4.\n        rw [Finset.card_eq_zero] at hDcard\n        subst hDcard\n        rw [Finset.coe_empty, Set.subset_empty_iff, Finset.coe_eq_empty] at hBsub\n        subst hBsub\n        simp at hBsum\n      · -- D.card = 1 : D = {d} with d ∣ 6, so the sum is 0 or d, neither equal to 4.\n        rw [Finset.card_eq_one] at hDcard\n        obtain ⟨d, rfl⟩ := hDcard\n        have hd : d ∈ Nat.divisors 6 := hDsub (by simp)\n        rw [hdiv] at hd\n        rw [Finset.coe_subset, Finset.subset_singleton_iff] at hBsub\n        fin_cases hd <;>\n          rcases hBsub with h | h <;> subst h <;> simp at hBsum\n\n/-- $h(12) = 3$: divisors are {1, 2, 3, 4, 6, 12}. The hardest m is\nm=11, requiring 3 divisors: 11=1+4+6. -/\n@[category test, AMS 11]\ntheorem practicalH_twelve : practicalH 12 = 3 := by\n  have hdiv : Nat.divisors 12 = ({1, 2, 3, 4, 6, 12} : Finset ℕ) := by decide\n  apply le_antisymm\n  · -- practicalH 12 ≤ 3 : each m in [1,12] is a sum of at most three divisors of 12.\n    apply Finset.sup_le\n    intro m hm\n    rw [Finset.mem_Icc] at hm\n    obtain ⟨hm1, hm2⟩ := hm\n    interval_cases m\n    · exact Nat.sInf_le ⟨{1, 2, 3}, by rw [hdiv]; decide, by decide, {1}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 2, 3}, by rw [hdiv]; decide, by decide, {2}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 2, 3}, by rw [hdiv]; decide, by decide, {3}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 4, 6}, by rw [hdiv]; decide, by decide, {4}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 4, 6}, by rw [hdiv]; decide, by decide, {1, 4}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 2, 3}, by rw [hdiv]; decide, by decide, {1, 2, 3}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 4, 6}, by rw [hdiv]; decide, by decide, {1, 6}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{2, 4, 6}, by rw [hdiv]; decide, by decide, {2, 6}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{3, 4, 6}, by rw [hdiv]; decide, by decide, {3, 6}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{4, 6, 12}, by rw [hdiv]; decide, by decide, {4, 6}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{1, 4, 6}, by rw [hdiv]; decide, by decide, {1, 4, 6}, by simp, by decide⟩\n    · exact Nat.sInf_le ⟨{2, 4, 6}, by rw [hdiv]; decide, by decide, {2, 4, 6}, by simp, by decide⟩\n  · -- 3 ≤ practicalH 12, witnessed by m = 11 (needs three divisors: 11 = 1 + 4 + 6).\n    have h11 : (11 : ℕ) ∈ Finset.Icc 1 12 := by decide\n    refine le_trans ?_ (Finset.le_sup h11)\n    apply le_csInf\n    · exact ⟨3, {1, 4, 6}, by rw [hdiv]; decide, by decide, {1, 4, 6}, by simp, by decide⟩\n    · rintro k ⟨D, hDsub, hDcard, B, hBsub, hBsum⟩\n      by_contra! hk\n      interval_cases k\n      · rw [Finset.card_eq_zero] at hDcard\n        subst hDcard\n        rw [Finset.coe_empty, Set.subset_empty_iff, Finset.coe_eq_empty] at hBsub\n        subst hBsub\n        simp at hBsum\n      · rw [Finset.card_eq_one] at hDcard\n        obtain ⟨d, rfl⟩ := hDcard\n        have hd : d ∈ Nat.divisors 12 := hDsub (by simp)\n        rw [hdiv] at hd\n        rw [Finset.coe_subset, Finset.subset_singleton_iff] at hBsub\n        fin_cases hd <;> rcases hBsub with h | h <;> subst h <;> simp at hBsum\n      · rw [Finset.card_eq_two] at hDcard\n        obtain ⟨a, b, hab, rfl⟩ := hDcard\n        have ha : a ∈ Nat.divisors 12 := hDsub (by simp)\n        have hb : b ∈ Nat.divisors 12 := hDsub (by simp)\n        rw [hdiv] at ha hb\n        have hBp : B ⊆ ({a, b} : Finset ℕ) := Finset.coe_subset.mp hBsub\n        have key : ∀ S ∈ ({a, b} : Finset ℕ).powerset, S.sum (fun x => x) ≠ 11 := by\n          fin_cases ha <;> fin_cases hb <;> decide\n        exact key B (Finset.mem_powerset.mpr hBp) hBsum.symm\n\n/-- $h(56) = 5$: the hard value is `55`, which needs five divisors of `56`. -/\n@[category test, AMS 11, formal_proof using formal_conjectures at\n  \"https://github.com/AlperTheKing/formal-conjectures/blob/fae83fbe5662aa759b8570ca7d04bb118da64f1d/FormalConjectures/ErdosProblems/18.lean#L301\"]\ntheorem practicalH_fiftysix : practicalH 56 = 5 := by\n  sorry\n\n/-- $h(7200) = 6$. The upper bound uses `7200 = 60 * 120`;\nthe hard value is `6667`. -/\n@[category test, AMS 11, formal_proof using formal_conjectures at\n  \"https://github.com/AlperTheKing/formal-conjectures/blob/fae83fbe5662aa759b8570ca7d04bb118da64f1d/FormalConjectures/ErdosProblems/18.lean#L396\"]\ntheorem practicalH_7200 : practicalH 7200 = 6 := by\n  sorry\n\n/-- For any practical number $n$, $h(n)$ ≤ number of divisors of $n$. -/\n@[category test, AMS 11]\ntheorem practicalH_le_divisors (n : ℕ) (hn : Nat.IsPractical n) :\n    practicalH n ≤ n.divisors.card := by\n  simp only [practicalH, Finset.sup_le_iff, Finset.mem_Icc]\n  exact fun m ⟨_, hm⟩ => Nat.sInf_le ⟨n.divisors, Finset.Subset.refl _, rfl, hn m hm⟩\n\n/-- $h(n!)$ is well-defined since $n!$ is practical for $n ≥ 1$. -/\n@[category textbook, AMS 11]\ntheorem factorial_isPractical (n : ℕ) : Nat.IsPractical n.factorial := by\n    induction n with\n  | zero =>\n    intro m hm; simp at hm; interval_cases m\n    · exact ⟨∅, by simp, by simp⟩\n    · exact ⟨{1}, by simp, by simp⟩\n  | succ n ih =>\n    intro m hm\n    by_cases hle : m ≤ n.factorial\n    · exact subsetSums_mono (by exact_mod_cast (Nat.divisors_subset_of_dvd\n        (Nat.factorial_ne_zero _) (Nat.factorial_dvd_factorial n.le_succ))) (ih m hle)\n    · push Not at hle; rw [Nat.factorial_succ] at hm\n      set q := m / (n + 1); set r := m % (n + 1)\n      have h_div : m = (n + 1) * q + r := (Nat.div_add_mod m (n + 1)).symm\n      have h_r_lt : r < n + 1 := Nat.mod_lt m (Nat.succ_pos n)\n      obtain ⟨B, hB_sub, hB_sum⟩ := ih q (Nat.div_le_of_le_mul (by linarith))\n      have hdvd : ∀ d ∈ B, d * (n + 1) ∈ (n + 1).factorial.divisors := fun d hd => by\n        refine Nat.mem_divisors.mpr ⟨?_, Nat.factorial_ne_zero _⟩\n        rw [mul_comm, Nat.factorial_succ]\n        exact mul_dvd_mul_left _ (Nat.dvd_of_mem_divisors (by exact_mod_cast hB_sub hd))\n      have hB'_sum : (B.image (· * (n + 1))).sum id = (n + 1) * q := by\n        rw [Finset.sum_image (fun a _ b _ h => mul_right_cancel₀ (by omega) h)]\n        simp [Finset.mul_sum, mul_comm, hB_sum]\n      by_cases hr : r = 0\n      · rw [show m = (B.image (· * (n + 1))).sum id from by rw [hB'_sum]; omega]\n        exact ⟨_, fun x hx => by\n          obtain ⟨d, hd, rfl⟩ := Finset.mem_image.mp hx; exact hdvd d hd, rfl⟩\n      · have h_disj : Disjoint (B.image (· * (n + 1))) {r} := by\n          rw [Finset.disjoint_singleton_right, Finset.mem_image]; rintro ⟨d, hd, hdr⟩\n          have : 0 < d := Nat.pos_of_dvd_of_pos\n            (Nat.dvd_of_mem_divisors (by exact_mod_cast hB_sub hd)) (Nat.factorial_pos n)\n          have := le_mul_of_one_le_left (Nat.zero_le (n + 1)) this\n          omega\n        rw [show m = (B.image (· * (n + 1)) ∪ {r}).sum id from by\n          rw [Finset.sum_union h_disj, Finset.sum_singleton, hB'_sum, id_eq]; exact h_div]\n        exact ⟨_, fun x hx => by\n          rcases Finset.mem_union.mp hx with h | h\n          · obtain ⟨d, hd, rfl⟩ := Finset.mem_image.mp h; exact hdvd d hd\n          · rw [Finset.mem_singleton.mp h]; exact Nat.mem_divisors.mpr\n              ⟨(Nat.dvd_factorial (by omega) (by omega)).trans\n                (Nat.factorial_dvd_factorial n.le_succ), Nat.factorial_ne_zero _⟩, rfl⟩\n\n/- ### Erdős's Conjectures -/\n\n/--\n**Conjecture 1.**\nAre there infinitely many practical numbers $m$ such that $h(m) < (\\log \\log m)^{O(1)}$?\n\nMore precisely: does there exist a constant $C > 0$ such that for infinitely many\npractical numbers $m$, we have $h(m) < (\\log \\log m)^C$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_18a :\n    ∃ C : ℝ, 0 < C ∧ ∃ᶠ m in atTop, Nat.IsPractical m ∧\n      (practicalH m : ℝ) < (log (log m)) ^ C := by\n  sorry\n\n/--\n**Conjecture 2.**\nIs it true that $h(n!) < n^{o(1)}$? That is, for all $\\varepsilon > 0$,\nis $h(n!) < n^\\varepsilon$ for sufficiently large $n$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_18b :\n    ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in atTop, (practicalH n.factorial : ℝ) < (n : ℝ) ^ ε := by\n  sorry\n\n/--\n**Conjecture 3.**\nOr perhaps even $h(n!) < (\\log n)^{O(1)}$?\n\nErdős offered \\$250 for a proof or disproof.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_18c :\n    ∃ C : ℝ, 0 < C ∧ ∀ᶠ n : ℕ in atTop, (practicalH n.factorial : ℝ) < (log n) ^ C := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Erdős's Theorem.**\nErdős proved that $h(n!) < n$ for all $n \\ge 1$.\n-/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/linrock/math-proofs/blob/b246a4165f55ada0614aa2b85c8bc6381522e808/erdos-18/Solution.lean#L31\"]\ntheorem erdos_18_upper_bound :\n    ∀ᶠ n : ℕ in atTop, practicalH (Nat.factorial n) < n := by\n  sorry\n\n/--\n**Vose's Theorem.**\nVose proved the existence of infinitely many practical numbers $m$ such that\n$h(m) \\ll (\\log m)^{1/2}$. This gives a positive answer to a weaker form of Conjecture 1.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_18_vose :\n    ∃ C : ℝ, 0 < C ∧ ∃ᶠ m in atTop, Nat.IsPractical m ∧\n      (practicalH m : ℝ) < C * (log m) ^ (1 / 2 : ℝ) := by\n  sorry\n\nend Erdos18\n",
  "statement_hash": "b78152d5b35cbc7652ff65bc3b832a6b26b364fa61c7a52e16b6d60fb88867cf",
  "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."
}