{
  "id": "1698",
  "ident": "NS.01698",
  "slug": "erdos-321",
  "title": "Erdős Problem 321",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $R(N)$ be the size of the largest $A\\subseteq\\{1, ..., N\\}$ such that all sums\n$\\sum_{n\\in S} \\frac{1}{n}$ are distinct for $S\\subseteq A$. What is $R(N)$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/321",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos321.erdos_321",
  "statement_lean": "theorem erdos_321 (N : ℕ) :\n    R N = erdos_321.answer",
  "challenge_source": "/-\nCopyright 2025 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 321\n\n*Reference:* [erdosproblems.com/321](https://www.erdosproblems.com/321)\n-/\n\n@[expose] public section\n\nopen Filter Real\n\nopen scoped Finset\n\nnamespace Erdos321\n\n/--\nLet $R(N)$ be the size of the largest $A\\subseteq\\{1, ..., N\\}$ such that all sums\n$\\sum_{n\\in S} \\frac{1}{n}$ are distinct for $S\\subseteq A$.\n-/\nnoncomputable def R (N : ℕ) : ℕ :=\n  sSup { #A | (A) (_ : A ⊆ Finset.Icc 1 N)\n      (_ : Set.InjOn (fun (S : Finset ℕ) ↦ ∑ n ∈ S, (1 : ℚ) / n) A.powerset) }\n\ndef erdos_321.answer : ℕ := sorry\n\n/--\nLet $R(N)$ be the size of the largest $A\\subseteq\\{1, ..., N\\}$ such that all sums\n$\\sum_{n\\in S} \\frac{1}{n}$ are distinct for $S\\subseteq A$. What is $R(N)$?\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_321 (N : ℕ) :\n    R N = erdos_321.answer := by\n  sorry\n\n/-\nFormalisation note: it's possible that solution to `erdos_321` needs to be\nexpressed asymptotically. To handle this we include `IsTheta`, `IsBigO`\nand `IsLittleO` variants below. Since a solution is not known this necessitates\nthe use of an `answer` definition left as `sorry`. Trivial or sub-optimal solutions\nwill therefore exist to the asymptotic formalisations. A true solution to\nthe asymptotic variants should have a degree of optimality or non-triviality to it.\n-/\n\ndef erdos_321.variants.isTheta.answer : ℕ → ℝ := sorry\n\n/--\nLet $R(N)$ be the size of the largest $A\\subseteq\\{1, ..., N\\}$ such that all sums\n$\\sum_{n\\in S} \\frac{1}{n}$ are distinct for $S\\subseteq A$. What is $\\Theta(R(N))$?\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_321.variants.isTheta :\n    (fun N ↦ (R N : ℝ)) =Θ[atTop] erdos_321.variants.isTheta.answer := by\n  sorry\n\ndef erdos_321.variants.isBigO.answer : ℕ → ℝ := sorry\n\n/--\nLet $R(N)$ be the size of the largest $A\\subseteq\\{1, ..., N\\}$ such that all sums $\\sum_{n\\in S} \\frac{1}{n}$ are distinct for $S\\subseteq A$. Find the simplest $g(N)$ such that $R(N) = O(g(N))$.\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_321.variants.isBigO :\n    (fun N ↦ (R N : ℝ)) =O[atTop] erdos_321.variants.isBigO.answer := by\n  sorry\n\ndef erdos_321.variants.isLittleO.answer : ℕ → ℝ := sorry\n\n/--\nLet $R(N)$ be the size of the largest $A\\subseteq\\{1, ..., N\\}$ such that all sums $\\sum_{n\\in S} \\frac{1}{n}$ are distinct for $S\\subseteq A$. Find the simplest $g(N)$ such that $R(N) = o(g(N))$.\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_321.variants.isLittleO :\n    (fun N ↦ (R N : ℝ)) =o[atTop] erdos_321.variants.isLittleO.answer := by\n  sorry\n\n/--\nLet $R(N)$ be the maximal such size. Results of Bleicher and Erdős from [BlEr75] and [BlEr76b] imply that\n$$\n\\frac{N}{\\log N} \\prod_{i=3}^{k} \\log_i N \\le R(N),\n$$\nvalid for any $k \\ge 4$ with $\\log_k N \\ge k$ and any $r \\ge 1$ with $\\log_{2r} N \\ge 1$. (In these bounds $\\log_i n$ denotes the $i$-fold iterated logarithm.)\n\n[BlEr75] Bleicher, M. N. and Erdős, P., _The number of distinct subsums of $\\sum_{1}^{N}\\,1/i$_. Math. Comp. (1975), 29-42.\n[BlEr76b] Bleicher, Michael N. and Erdős, Paul, _Denominators of Egyptian fractions. II_. Illinois J. Math. (1976), 598-613.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_321.variants.lower (N k : ℕ) (hk : 4 ≤ k) (hkN : k ≤ log^[k] N) :\n    N / log N * ∏ i ∈ Finset.Icc 3 k, (log^[i] N) ≤ R N := by\n  sorry\n\n/--\nLet $R(N)$ be the maximal such size. Results of Bleicher and Erdős from [BlEr75] and [BlEr76b] imply that\n$$\nR(N) \\le \\frac{1}{\\log 2} \\log_r N \\left( \\frac{N}{\\log N} \\prod_{i=3}^{r} \\log_i N \\right),\n$$\nvalid for any $k \\ge 4$ with $\\log_k N \\ge k$ and any $r \\ge 1$ with $\\log_{2r} N \\ge 1$. (In these bounds $\\log_i n$ denotes the $i$-fold iterated logarithm.)\n\nSince `Real.log` is defined on all of $\\mathbb{R}$, the condition $\\log_{2r} N \\ge 1$ is\nformalised as $\\log_i N \\ge 1$ for all $i \\le 2r$, which is equivalent to it for the\ngenuine iterated logarithm and ensures that every intermediate iterate is positive.\n\n[BlEr75] Bleicher, M. N. and Erdős, P., _The number of distinct subsums of $\\sum_{1}^{N}\\,1/i$_. Math. Comp. (1975), 29-42.\n[BlEr76b] Bleicher, Michael N. and Erdős, Paul, _Denominators of Egyptian fractions. II_. Illinois J. Math. (1976), 598-613.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_321.variants.upper (N r : ℕ) (hr : 1 ≤ r) (hrN : ∀ i ≤ 2 * r, 1 ≤ log^[i] N) :\n    R N ≤ 1 / log 2 * log^[r] N * N / log N * ∏ i ∈ Finset.Icc 3 r, (log^[i] N) := by\n  sorry\n\nend Erdos321\n",
  "statement_hash": "a2c61bb2b5545a4e95e6329973550f14344245f30201503daf6bb3b9edf33ee4",
  "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."
}