{
  "id": "1590",
  "ident": "NS.01590",
  "slug": "erdos-297",
  "title": "Erdős Problem 297",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $N\\geq 1$. How many $A\\subseteq \\{1,\\ldots,N\\}$ are there such that\n$\\sum_{n\\in A}\\frac{1}{n}=1$?\n\nLiu and Sawhney [LiSa24] proved that the count is $2^{(0.91\\cdots+o(1))N}$, where $0.91\\cdots$ is\nan explicit number defined as the solution to a certain integral equation; independently the same\nasymptotic was proved by Conlon, Fox, He, Mubayi, Pham, Suk, and Verstraëte [CFHMPSV24]. We\nformalise the question as asking for the exponential growth rate\n$\\lim_{N\\to\\infty} \\frac{1}{N}\\log_2 \\#\\{A\\}$. The first conjunct is the existence and\nuniqueness of $\\lambda^*$, which [LiSa24] state with the theorem.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos297.erdos_297",
  "statement_lean": "theorem erdos_297 : (∃! l : ℝ, massIntegral l = 1) ∧\n    Tendsto (fun N : ℕ => Real.logb 2 (count 1 N) / N) atTop (𝓝 erdos_297.answer)",
  "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 297\n\n*References:*\n- [erdosproblems.com/297](https://www.erdosproblems.com/297)\n- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number\n  theory*. Monographies de L'Enseignement Mathematique (1980).\n- [CFHMPSV24] Conlon, D., Fox, J., He, X., Mubayi, D., Pham, H. T., Suk, A. and Verstraëte, J.,\n  *A question of Erdős and Graham on Egyptian fractions*. arXiv:2404.16016 (2024).\n- [LiSa24] Liu, Y. P. and Sawhney, M., *On further questions regarding unit fractions*.\n  arXiv:2404.07113 (2024).\n- [St24] Steinerberger, S., *On a problem involving unit fractions*. arXiv:2403.17041 (2024).\n-/\n\n@[expose] public section\n\nopen Filter\nopen scoped Topology\n\nnamespace Erdos297\n\n/-- The number of $A \\subseteq \\{1, \\ldots, N\\}$ with $\\sum_{n \\in A} \\frac{1}{n} = x$. -/\ndef count (x : ℚ) (N : ℕ) : ℕ :=\n  {A ∈ (Finset.Icc 1 N).powerset | ∑ n ∈ A, (1 / (n : ℕ) : ℚ) = x}.card\n\n@[category test, AMS 11]\ntheorem count_one_five : count 1 5 = 1 := by decide +kernel\n\n@[category test, AMS 11]\ntheorem count_one_six : count 1 6 = 2 := by decide +kernel\n\n@[category test, AMS 11]\ntheorem count_half_six : count (1 / 2) 6 = 2 := by decide +kernel\n\n/--\nThe integral $\\int_0^1 \\frac{dy}{y(1 + e^{\\lambda / y})}$, which equals\n$\\int_0^1 \\frac{e^{-\\lambda/y}}{1 + e^{-\\lambda/y}} \\frac{dy}{y}$. It diverges for\n$\\lambda \\leq 0$ (the Lean integral is then `0`), so for $x > 0$ every solution of\n`massIntegral λ = x` is positive.\n-/\nnoncomputable def massIntegral (l : ℝ) : ℝ :=\n  ∫ y in (0 : ℝ)..1, 1 / (y * (1 + Real.exp (l / y)))\n\n/-- The unique real $\\lambda_x$ with `massIntegral λ_x = x`, for $x > 0$. -/\nnoncomputable def lambdaOf (x : ℝ) : ℝ :=\n  sInf {l : ℝ | massIntegral l = x}\n\n/--\nThe constant $\\gamma^* / \\log 2 = 0.91\\cdots$ of [LiSa24], where $\\lambda^* = \\lambda_1$ and\n$\\gamma^* = \\lambda^* + \\int_0^1 \\log(1 + e^{-\\lambda^*/y})\\,dy$. Numerically\n$\\lambda^* \\approx 0.127191$ and $\\gamma^* \\approx 0.631573$.\n-/\nnoncomputable def erdos_297.answer : ℝ :=\n  (lambdaOf 1 + ∫ y in (0 : ℝ)..1, Real.log (1 + Real.exp (-lambdaOf 1 / y))) / Real.log 2\n\n/--\nLet $N\\geq 1$. How many $A\\subseteq \\{1,\\ldots,N\\}$ are there such that\n$\\sum_{n\\in A}\\frac{1}{n}=1$?\n\nLiu and Sawhney [LiSa24] proved that the count is $2^{(0.91\\cdots+o(1))N}$, where $0.91\\cdots$ is\nan explicit number defined as the solution to a certain integral equation; independently the same\nasymptotic was proved by Conlon, Fox, He, Mubayi, Pham, Suk, and Verstraëte [CFHMPSV24]. We\nformalise the question as asking for the exponential growth rate\n$\\lim_{N\\to\\infty} \\frac{1}{N}\\log_2 \\#\\{A\\}$. The first conjunct is the existence and\nuniqueness of $\\lambda^*$, which [LiSa24] state with the theorem.\n-/\n@[category research solved, question value, AMS 11]\ntheorem erdos_297 : (∃! l : ℝ, massIntegral l = 1) ∧\n    Tendsto (fun N : ℕ => Real.logb 2 (count 1 N) / N) atTop (𝓝 erdos_297.answer) := by\n  sorry\n\n/--\nSteinerberger [St24] proved that, for $N$ sufficiently large, the number of\n$A \\subseteq \\{1, \\ldots, N\\}$ with $\\sum_{n\\in A}\\frac{1}{n} \\leq 1$ is at most $2^{0.93N}$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_297.variants.steinerberger : ∀ᶠ N : ℕ in atTop,\n    ({A ∈ (Finset.Icc 1 N).powerset | ∑ n ∈ A, (1 / (n : ℕ) : ℚ) ≤ 1}.card : ℝ) ≤\n      2 ^ (0.93 * N : ℝ) := by\n  sorry\n\n/--\nThe binary-entropy exponent $c_x = \\int_0^1 h\\left(\\frac{1}{1 + e^{\\lambda_x / y}}\\right) dy$ of\n[CFHMPSV24], where $h$ is the binary entropy in bits.\n-/\nnoncomputable def exponentOf (x : ℝ) : ℝ :=\n  ∫ y in (0 : ℝ)..1, Real.binEntropy (1 / (1 + Real.exp (lambdaOf x / y))) / Real.log 2\n\n/--\nConlon, Fox, He, Mubayi, Pham, Suk, and Verstraëte [CFHMPSV24] prove more generally, for any\n$x\\in \\mathbb{Q}_{>0}$, that the number of $A\\subseteq \\{1,\\ldots,N\\}$ such that\n$\\sum_{n\\in A}\\frac{1}{n}=x$ is $2^{(c_x + o(1))N}$, with $c_x$ as in `exponentOf`.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_297.variants.general (x : ℚ) (hx : 0 < x) : (∃! l : ℝ, massIntegral l = x) ∧\n    Tendsto (fun N : ℕ => Real.logb 2 (count x N) / N) atTop (𝓝 (exponentOf x)) := by\n  sorry\n\nend Erdos297\n",
  "statement_hash": "ef73c1007c3c12792bb3150c1bdef5d69a0714524911a620908d818506e2e8f3",
  "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."
}