/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ import FormalConjecturesUtil

Erdős Problem 18

Reference:

    erdosproblems.com/18

    [ErGr80] Erdős, P. and Graham, R. L. (1980). Old and New Problems and Results in Combinatorial Number Theory. Monographies de L'Enseignement Mathématique, 28. Université de Genève. (See the sections on Egyptian fractions or practical numbers).

    [Vo85] Vose, Michael D., Egyptian fractions. Bull. London Math. Soc. (1985), 21-24.

open Filter Asymptotics Realnamespace Erdos18

For a practical number $n$, $h(n)$ is the maximum over all $1 ≤ m ≤ n$ of the minimum number of divisors of $n$ needed to represent $m$ as a sum of distinct divisors.

noncomputable def practicalH (n : ) : := Finset.sup (Finset.Icc 1 n) fun m => sInf {k | D : Finset , D n.divisors D.card = k m subsetSums D}

$h(1) = 1$: we need the single divisor {1} to represent 1.

@[category test, AMS 11] theorem practicalH_one : practicalH 1 = 1 := practicalH 1 = 1 All goals completed! 🐙

$h(2) = 1$: divisors are {1, 2}, each of m=1,2 needs only 1 divisor.

h1:sInf {k | D {1, 2}, D.card = k 1 subsetSums D} = 1h2:sInf {k | D {1, 2}, D.card = k 2 subsetSums D} = 1max (sInf {k | D {1, 2}, D.card = k 1 subsetSums D}) (sInf {k | D {1, 2}, D.card = k 2 subsetSums D}) = 1 All goals completed! 🐙

$h(6) = 2$: divisors are {1, 2, 3, 6}. The hardest m to represent is m=4 or m=5, each requiring 2 divisors: 4=1+3, 5=2+3.

hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2d:hDsub:{d} Nat.divisors 6hBsub:B = B = {d}hd:d {1, 2, 3, 6}False hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{1} Nat.divisors 6hBsub:B = B = {1}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{2} Nat.divisors 6hBsub:B = B = {2}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{3} Nat.divisors 6hBsub:B = B = {3}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{6} Nat.divisors 6hBsub:B = B = {6}False hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{1} Nat.divisors 6hBsub:B = B = {1}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{2} Nat.divisors 6hBsub:B = B = {2}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{3} Nat.divisors 6hBsub:B = B = {3}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{6} Nat.divisors 6hBsub:B = B = {6}False hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{6} Nat.divisors 6h:B = Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{6} Nat.divisors 6h:B = {6}False hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{1} Nat.divisors 6h:B = Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{1} Nat.divisors 6h:B = {1}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{2} Nat.divisors 6h:B = Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{2} Nat.divisors 6h:B = {2}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{3} Nat.divisors 6h:B = Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{3} Nat.divisors 6h:B = {3}Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{6} Nat.divisors 6h:B = Falsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:B:Finset hBsum:4 = i B, ihk:1 < 2hDsub:{6} Nat.divisors 6h:B = {6}False hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{6} Nat.divisors 6hBsum:4 = i {6}, iFalse hdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{1} Nat.divisors 6hBsum:4 = i , iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{1} Nat.divisors 6hBsum:4 = i {1}, iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{2} Nat.divisors 6hBsum:4 = i , iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{2} Nat.divisors 6hBsum:4 = i {2}, iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{3} Nat.divisors 6hBsum:4 = i , iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{3} Nat.divisors 6hBsum:4 = i {3}, iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{6} Nat.divisors 6hBsum:4 = i , iFalsehdiv:Nat.divisors 6 = {1, 2, 3, 6}h4:4 Finset.Icc 1 6k:hk:1 < 2hDsub:{6} Nat.divisors 6hBsum:4 = i {6}, iFalse All goals completed! 🐙

$h(12) = 3$: divisors are {1, 2, 3, 4, 6, 12}. The hardest m is m=11, requiring 3 divisors: 11=1+4+6.

hdiv:Nat.divisors 12 = {1, 2, 3, 4, 6, 12}h11:11 Finset.Icc 1 12k:B:Finset hBsum:11 = i B, ihk:2 < 3a:b:hab:a bhDsub:{a, b} Nat.divisors 12hBsub:B {a, b}ha:a {1, 2, 3, 4, 6, 12}hb:b {1, 2, 3, 4, 6, 12}hBp:B {a, b}key: S {a, b}.powerset, x S, x 11False All goals completed! 🐙

For any practical number $n$, $h(n)$ ≤ number of divisors of $n$.

@[category test, AMS 11] theorem practicalH_le_divisors (n : ) (hn : Nat.IsPractical n) : practicalH n n.divisors.card := n:hn:n.IsPracticalpracticalH n n.divisors.card n:hn:n.IsPractical (b : ), 1 b b n sInf {k | D n.divisors, D.card = k b subsetSums D} n.divisors.card All goals completed! 🐙

$h(n!)$ is well-defined since $n!$ is practical for $n ≥ 1$.

n:ih:n.factorial.IsPracticalm:hm:m (n + 1) * n.factorialhle:n.factorial < mq: := m / (n + 1)r: := m % (n + 1)h_div:m = (n + 1) * q + rh_r_lt:r < n + 1B:Finset hB_sub:B n.factorial.divisorshB_sum:q = i B, ihdvd: d B, d * (n + 1) (n + 1).factorial.divisorshB'_sum:(Finset.image (fun x x * (n + 1)) B).sum id = (n + 1) * qhr:¬r = 0h_disj:Disjoint (Finset.image (fun x x * (n + 1)) B) {r}x:hx:x (Finset.image (fun x x * (n + 1)) B {r})h:x {r}r (n + 1).factorial.divisors; exact Nat.mem_divisors.mpr (Nat.dvd_factorial (n:ih:n.factorial.IsPracticalm:hm:m (n + 1) * n.factorialhle:n.factorial < mq: := m / (n + 1)r: := m % (n + 1)h_div:m = (n + 1) * q + rh_r_lt:r < n + 1B:Finset hB_sub:B n.factorial.divisorshB_sum:q = i B, ihdvd: d B, d * (n + 1) (n + 1).factorial.divisorshB'_sum:(Finset.image (fun x x * (n + 1)) B).sum id = (n + 1) * qhr:¬r = 0h_disj:Disjoint (Finset.image (fun x x * (n + 1)) B) {r}x:hx:x (Finset.image (fun x x * (n + 1)) B {r})h:x {r}0 < r All goals completed! 🐙) (n:ih:n.factorial.IsPracticalm:hm:m (n + 1) * n.factorialhle:n.factorial < mq: := m / (n + 1)r: := m % (n + 1)h_div:m = (n + 1) * q + rh_r_lt:r < n + 1B:Finset hB_sub:B n.factorial.divisorshB_sum:q = i B, ihdvd: d B, d * (n + 1) (n + 1).factorial.divisorshB'_sum:(Finset.image (fun x x * (n + 1)) B).sum id = (n + 1) * qhr:¬r = 0h_disj:Disjoint (Finset.image (fun x x * (n + 1)) B) {r}x:hx:x (Finset.image (fun x x * (n + 1)) B {r})h:x {r}r n All goals completed! 🐙)).trans (Nat.factorial_dvd_factorial n.le_succ), Nat.factorial_ne_zero _, rfl

Conjecture 1. Are there infinitely many practical numbers $m$ such that $h(m) < (\log \log m)^{O(1)}$?

More precisely: does there exist a constant $C > 0$ such that for infinitely many practical numbers $m$, we have $h(m) < (\log \log m)^C$?

@[category research open, AMS 11] theorem erdos_18a : answer(sorry) C : , 0 < C ∃ᶠ m in atTop, Nat.IsPractical m (practicalH m : ) < (log (log m)) ^ C := True C, 0 < C ∃ᶠ (m : ) in atTop, m.IsPractical (practicalH m) < log (log m) ^ C All goals completed! 🐙

Conjecture 2. Is it true that $h(n!) < n^{o(1)}$? That is, for all $\varepsilon > 0$, is $h(n!) < n^\varepsilon$ for sufficiently large $n$?

@[category research open, AMS 11] theorem erdos_18b : answer(sorry) ε : , 0 < ε ∀ᶠ n : in atTop, (practicalH n.factorial : ) < (n : ) ^ ε := True (ε : ), 0 < ε ∀ᶠ (n : ) in atTop, (practicalH n.factorial) < n ^ ε All goals completed! 🐙

Conjecture 3. Or perhaps even $h(n!) < (\log n)^{O(1)}$?

Erdős offered $250 for a proof or disproof.

@[category research open, AMS 11] theorem erdos_18c : answer(sorry) C : , 0 < C ∀ᶠ n : in atTop, (practicalH n.factorial : ) < (log n) ^ C := True C, 0 < C ∀ᶠ (n : ) in atTop, (practicalH n.factorial) < log n ^ C All goals completed! 🐙

Erdős's Theorem. Erdős proved that $h(n!) < n$ for all $n \ge 1$.

@[category research solved, AMS 11] theorem erdos_18_upper_bound : ∀ᶠ n : in atTop, practicalH (Nat.factorial n) < n := ∀ᶠ (n : ) in atTop, practicalH n.factorial < n All goals completed! 🐙

Vose's Theorem. Vose proved the existence of infinitely many practical numbers $m$ such that $h(m) \ll (\log m)^{1/2}$. This gives a positive answer to a weaker form of Conjecture 1.

@[category research solved, AMS 11] theorem erdos_18_vose : C : , 0 < C ∃ᶠ m in atTop, Nat.IsPractical m (practicalH m : ) < C * (log m) ^ (1 / 2 : ) := C, 0 < C ∃ᶠ (m : ) in atTop, m.IsPractical (practicalH m) < C * log m ^ (1 / 2) All goals completed! 🐙end Erdos18