{
  "id": "1125",
  "ident": "NS.01125",
  "slug": "erdos-148--f-two",
  "title": "Erdős Problem 148 · F_two",
  "status": "test",
  "statement_status": "reviewed",
  "statement_md": "$1$ is not a sum of two distinct unit fractions.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos148.F_two",
  "statement_lean": "theorem F_two : F 2 = 0",
  "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 148\n\n*References:*\n- [erdosproblems.com/148](https://www.erdosproblems.com/148)\n- [ElPl21] Elsholtz, Christian and Planitzer, Stefan, *Sums of four and more unit fractions and\n  approximate parametrizations*. Bull. Lond. Math. Soc. (2021), 695-709.\n- [Ko14] Konyagin, S. V., *Double exponential lower bound for the number of representations of\n  unity by Egyptian fractions*. Math. Notes (2014), 277-281.\n- [OEIS A006585](https://oeis.org/A006585)\n-/\n\n@[expose] public section\n\nopen Filter Real\n\nnamespace Erdos148\n\n/-- `F k` is the number of solutions to $1 = \\frac{1}{n_1} + \\cdots + \\frac{1}{n_k}$ with\n$1 \\leq n_1 < \\cdots < n_k$, that is, the number of $k$-element sets of positive integers whose\nreciprocals sum to $1$. -/\nnoncomputable def F (k : ℕ) : ℕ :=\n  {S : Finset ℕ | S.card = k ∧ 0 ∉ S ∧ ∑ n ∈ S, (1 : ℚ) / n = 1}.ncard\n\n/-- The sequence $u_0 = 1$, $u_{n+1} = u_n(u_n + 1)$ of [ElPl21, Corollary 3]:\n$1, 2, 6, 42, 1806, \\ldots$, a shifted copy of Sylvester's sequence. This is the sequence\n`Erdos315.u` of Erdős Problem 315. -/\ndef u : ℕ → ℕ\n  | 0 => 1\n  | n + 1 => u n * (u n + 1)\n\n/-- The constant $c_0 = \\lim_{n \\to \\infty} u_n^{2^{-n}} = 1.5979102\\ldots$ of\n[ElPl21, Corollary 3]. The sequence $u_n^{2^{-n}}$ is increasing and bounded by $2$\n[ElPl21, Remark 3], so the limit is its supremum. This constant is the square of the Vardi\nconstant $1.26408\\ldots$, which is `Erdos315.c₀`. -/\nnoncomputable def c₀ : ℝ := ⨆ n : ℕ, (u n : ℝ) ^ ((1 : ℝ) / 2 ^ n)\n\n/-- The only representation of $1$ as a single unit fraction is $1 = \\frac{1}{1}$. -/\n@[category test, AMS 11]\ntheorem F_one : F 1 = 1 := by\n  have h : {S : Finset ℕ | S.card = 1 ∧ 0 ∉ S ∧ ∑ n ∈ S, (1 : ℚ) / n = 1} =\n      {{1}} := by\n    ext S\n    simp only [Set.mem_ofPred_eq, Set.mem_singleton_iff, Finset.card_eq_one]\n    constructor\n    · rintro ⟨⟨a, rfl⟩, -, hsum⟩\n      simp only [Finset.sum_singleton, one_div, inv_eq_one, Nat.cast_eq_one] at hsum\n      rw [hsum]\n    · rintro rfl\n      exact ⟨⟨1, rfl⟩, by simp, by simp⟩\n  rw [F, h, Set.ncard_singleton]\n\n/-- $1$ is not a sum of two distinct unit fractions. -/\n@[category test, AMS 11]\ntheorem F_two : F 2 = 0 := by\n  have h : {S : Finset ℕ | S.card = 2 ∧ 0 ∉ S ∧ ∑ n ∈ S, (1 : ℚ) / n = 1} = ∅ := by\n    ext S\n    simp only [Set.mem_ofPred_eq, Set.mem_empty_iff_false, iff_false, not_and]\n    intro hS h0 hsum\n    obtain ⟨x, y, hxy, rfl⟩ := Finset.card_eq_two.mp hS\n    simp only [Finset.mem_insert, Finset.mem_singleton, not_or] at h0\n    rw [Finset.sum_pair hxy] at hsum\n    have hx : (x : ℚ) ≠ 0 := by exact_mod_cast Ne.symm h0.1\n    have hy : (y : ℚ) ≠ 0 := by exact_mod_cast Ne.symm h0.2\n    rw [div_add_div _ _ hx hy, div_eq_one_iff_eq (mul_ne_zero hx hy)] at hsum\n    have e : y + x = x * y := by\n      exact_mod_cast (by linear_combination hsum : (y : ℚ) + x = x * y)\n    rcases Nat.lt_or_ge x 3 with hx3 | hx3\n    · interval_cases x <;> omega\n    rcases Nat.lt_or_ge y 3 with hy3 | hy3\n    · interval_cases y <;> omega\n    nlinarith\n  rw [F, h, Set.ncard_empty]\n\n/-- If $0 < x < y < z$ and $1 = \\frac{1}{x} + \\frac{1}{y} + \\frac{1}{z}$, then\n$(x, y, z) = (2, 3, 6)$. -/\n@[category API, AMS 11]\nprivate lemma eq_two_three_six {x y z : ℕ} (hx : 0 < x) (hxy : x < y) (hyz : y < z)\n    (h : (1 : ℚ) / x + 1 / y + 1 / z = 1) : x = 2 ∧ y = 3 ∧ z = 6 := by\n  have hx' : (x : ℚ) ≠ 0 := by exact_mod_cast hx.ne'\n  have hy' : (y : ℚ) ≠ 0 := by exact_mod_cast (by omega : y ≠ 0)\n  have hz' : (z : ℚ) ≠ 0 := by exact_mod_cast (by omega : z ≠ 0)\n  rw [div_add_div _ _ hx' hy', div_add_div _ _ (mul_ne_zero hx' hy') hz',\n    div_eq_one_iff_eq (mul_ne_zero (mul_ne_zero hx' hy') hz')] at h\n  have e : y * z + x * z + x * y = x * y * z := by\n    exact_mod_cast (by linear_combination h : (y * z + x * z + x * y : ℚ) = x * y * z)\n  rcases Nat.lt_or_ge x 3 with hx3 | hx3\n  · interval_cases x\n    · nlinarith\n    · rcases Nat.lt_or_ge y 4 with hy4 | hy4\n      · interval_cases y\n        exact ⟨rfl, rfl, by omega⟩\n      · nlinarith\n  · have h1 : x * z < y * z := Nat.mul_lt_mul_of_pos_right hxy (by omega)\n    have h2 : x * y < y * z := by nlinarith\n    have h3 : 3 * (y * z) ≤ x * (y * z) := Nat.mul_le_mul_right _ hx3\n    nlinarith\n\n/-- The only representation of $1$ as a sum of three distinct unit fractions is\n$1 = \\frac{1}{2} + \\frac{1}{3} + \\frac{1}{6}$. -/\n@[category test, AMS 11]\ntheorem F_three : F 3 = 1 := by\n  have h : {S : Finset ℕ | S.card = 3 ∧ 0 ∉ S ∧ ∑ n ∈ S, (1 : ℚ) / n = 1} =\n      {{2, 3, 6}} := by\n    ext S\n    simp only [Set.mem_ofPred_eq, Set.mem_singleton_iff]\n    constructor\n    · rintro ⟨hS, h0, hsum⟩\n      obtain ⟨x, y, z, hxy, hxz, hyz, rfl⟩ := Finset.card_eq_three.mp hS\n      simp only [Finset.mem_insert, Finset.mem_singleton, not_or] at h0\n      rw [Finset.sum_insert (by simp [hxy, hxz]), Finset.sum_pair hyz] at hsum\n      have hx : 0 < x := by omega\n      have hy : 0 < y := by omega\n      have hz : 0 < z := by omega\n      rcases lt_or_gt_of_ne hxy with h1 | h1 <;> rcases lt_or_gt_of_ne hxz with h2 | h2 <;>\n        rcases lt_or_gt_of_ne hyz with h3 | h3\n      · obtain ⟨rfl, rfl, rfl⟩ := eq_two_three_six hx h1 h3 (by linarith); decide\n      · obtain ⟨rfl, rfl, rfl⟩ := eq_two_three_six hx h2 h3 (by linarith); decide\n      · omega\n      · obtain ⟨rfl, rfl, rfl⟩ := eq_two_three_six hz h2 h1 (by linarith); decide\n      · obtain ⟨rfl, rfl, rfl⟩ := eq_two_three_six hy h1 h2 (by linarith); decide\n      · omega\n      · obtain ⟨rfl, rfl, rfl⟩ := eq_two_three_six hy h3 h2 (by linarith); decide\n      · obtain ⟨rfl, rfl, rfl⟩ := eq_two_three_six hz h3 h1 (by linarith); decide\n    · rintro rfl\n      refine ⟨by decide, by decide, ?_⟩\n      rw [Finset.sum_insert (by decide), Finset.sum_pair (by decide)]\n      norm_num\n  rw [F, h, Set.ncard_singleton]\n\n/-- The values $F(1), \\ldots, F(8)$ are $1, 0, 1, 6, 72, 2320, 245765, 151182379$\n([OEIS A006585](https://oeis.org/A006585)). $F(8)$ is due to John Dethridge (2004).\nIt was recomputed independently in the\n[erdosproblems.com forum](https://www.erdosproblems.com/forum/thread/148). -/\n@[category test, AMS 11]\ntheorem F_first_values :\n    F 1 = 1 ∧ F 2 = 0 ∧ F 3 = 1 ∧ F 4 = 6 ∧ F 5 = 72 ∧ F 6 = 2320 ∧ F 7 = 245765 ∧\n      F 8 = 151182379 := by\n  refine ⟨F_one, F_two, F_three, ?_⟩\n  sorry\n\n/-- The first values of the sequence are $1, 2, 6, 42, 1806$. -/\n@[category test, AMS 11]\ntheorem u_first_values : u 0 = 1 ∧ u 1 = 2 ∧ u 2 = 6 ∧ u 3 = 42 ∧ u 4 = 1806 := by\n  decide\n\ndef erdos_148.answer : ℕ → ℝ := sorry\n\n/--\nLet $F(k)$ be the number of solutions to\n$$ 1= \\frac{1}{n_1}+\\cdots+\\frac{1}{n_k},$$\nwhere $1\\leq n_1<\\cdots<n_k$ are distinct integers. Find good estimates for $F(k)$.\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_148 : (fun k ↦ (F k : ℝ)) =Θ[atTop] erdos_148.answer := by\n  sorry\n\n/--\nThe current best bounds known are\n$$2^{c^{\\frac{k}{\\log k}}}\\leq F(k) \\leq c_0^{(\\frac{1}{5}+o(1))2^k},$$\nwhere $c>0$ is some absolute constant and $c_0=1.5979102\\ldots$ is the square of the 'Vardi\nconstant' $1.26408\\cdots$. The lower bound is due to Konyagin [Ko14] and the upper bound to\nElsholtz and Planitzer [ElPl21]. (erdosproblems.com gives $c_0=1.26408\\cdots$;\n[ElPl21, Remark 3] gives $c_0=1.5979102\\ldots$.)\n\n[Ko14, Theorem 1] states the lower bound in the explicit form\n$$F(k) \\geq \\exp\\left(\\exp\\left(\\left(\\frac{(\\log 2)(\\log 3)}{3}+o(1)\\right)\n\\frac{k}{\\log k}\\right)\\right) \\quad (k \\to \\infty),$$\nwhich is the statement formalised here.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_148.variants.lower_bound :\n    ∃ o : ℕ → ℝ, o =o[atTop] (1 : ℕ → ℝ) ∧ ∀ᶠ k : ℕ in atTop,\n      exp (exp ((log 2 * log 3 / 3 + o k) * ((k : ℝ) / log k))) ≤ F k := by\n  sorry\n\n/--\nThe current best bounds known are\n$$2^{c^{\\frac{k}{\\log k}}}\\leq F(k) \\leq c_0^{(\\frac{1}{5}+o(1))2^k},$$\nwhere $c>0$ is some absolute constant and $c_0=1.5979102\\ldots$ is the square of the 'Vardi\nconstant' $1.26408\\cdots$. The lower bound is due to Konyagin [Ko14] and the upper bound to\nElsholtz and Planitzer [ElPl21]. (erdosproblems.com gives $c_0=1.26408\\cdots$;\n[ElPl21, Remark 3] gives $c_0=1.5979102\\ldots$.)\n\n[ElPl21, Corollary 3(2)] shows that for every $\\varepsilon > 0$ and all $k \\geq k(\\varepsilon)$,\nthe number $f_k(1,1) \\geq F(k)$ of solutions with $n_1 \\leq \\cdots \\leq n_k$ is less than\n$c_0^{(\\frac{2}{5}+\\varepsilon)2^{k-1}} = c_0^{(\\frac{1}{5}+\\frac{\\varepsilon}{2})2^k}$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_148.variants.upper_bound :\n    ∃ o : ℕ → ℝ, o =o[atTop] (1 : ℕ → ℝ) ∧ ∀ᶠ k : ℕ in atTop,\n      (F k : ℝ) ≤ c₀ ^ ((1 / 5 + o k) * 2 ^ k) := by\n  sorry\n\nend Erdos148\n",
  "statement_hash": "f57e12289f700e0bc893f059fd1c44c6cdc6613d40dd872a6f92d72db25388bb",
  "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."
}