{
  "id": "1619",
  "ident": "NS.01619",
  "slug": "erdos-302",
  "title": "Erdős Problem 302",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $f(N)$ be the size of the largest $A\\subseteq \\{1,\\ldots,N\\}$ such that there are no\nsolutions to\n$$\\frac{1}{a}= \\frac{1}{b}+\\frac{1}{c}$$\nwith distinct $a,b,c\\in A$? Estimate $f(N)$.\n\nThe colouring version of this is [303], which was solved by Brown and Rödl [BrRo91].",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos302.erdos_302.parts.i",
  "statement_lean": "theorem erdos_302.parts.i (f : ℕ → ℕ) (hf : ∀ N, IsMaxNoTripleCard N (f N)) :\n    Tendsto (fun N : ℕ => (f N : ℝ) / N) atTop (𝓝 erdos_302.parts.i.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 302\n\n*References:*\n- [erdosproblems.com/302](https://www.erdosproblems.com/302)\n- [BrRo91] Brown, Tom C. and Rödl, Voijtech, Monochromatic solutions to equations with unit\n  fractions. Bull. Austral. Math. Soc. (1991), 387-392.\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- [va25](https://github.com/Woett/Mathematical-shorts/blob/main/Two-colouring%20and%20density%20lead%20to%20solutions%20to%20an%20equation%20in%20unit%20fractions.pdf)\n-/\n\n@[expose] public section\n\nopen Filter Finset\nopen scoped Topology\n\nnamespace Erdos302\n\n/--\nA finite set $A$ of positive integers admits no solution to\n$\\frac{1}{a} = \\frac{1}{b} + \\frac{1}{c}$ with $a, b, c$ distinct elements of $A$.\n-/\ndef NoUnitFractionTriple (A : Finset ℕ) : Prop :=\n  ∀ a ∈ A, ∀ b ∈ A, ∀ c ∈ A, a ≠ b → a ≠ c → b ≠ c →\n    (1 : ℚ) / a ≠ (1 : ℚ) / b + (1 : ℚ) / c\n\n/--\n$f N$ is the size of the largest $A ⊆ \\{1, …, N\\}$ containing no solution to\n$\\frac{1}{a} = \\frac{1}{b} + \\frac{1}{c}$ with distinct $a, b, c ∈ A$.\n-/\ndef IsMaxNoTripleCard (N m : ℕ) : Prop :=\n  IsGreatest {k | ∃ A ⊆ Finset.Icc 1 N, NoUnitFractionTriple A ∧ A.card = k} m\n\ndef erdos_302.parts.i.answer : ℝ := sorry\n\n/--\nLet $f(N)$ be the size of the largest $A\\subseteq \\{1,\\ldots,N\\}$ such that there are no\nsolutions to\n$$\\frac{1}{a}= \\frac{1}{b}+\\frac{1}{c}$$\nwith distinct $a,b,c\\in A$? Estimate $f(N)$.\n\nThe colouring version of this is [303], which was solved by Brown and Rödl [BrRo91].\n-/\n@[category research open, question value, AMS 11]\ntheorem erdos_302.parts.i (f : ℕ → ℕ) (hf : ∀ N, IsMaxNoTripleCard N (f N)) :\n    Tendsto (fun N : ℕ => (f N : ℝ) / N) atTop (𝓝 erdos_302.parts.i.answer) := by\n  sorry\n\n/--\nIn particular, is $f(N)=(\\tfrac{1}{2}+o(1))N$?\n\nThis is false: it is contradicted by Cambie's lower bound of $(5/8+o(1))N$ recorded below,\nsince $5/8 > 1/2$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_302.parts.ii (f : ℕ → ℕ) (hf : ∀ N, IsMaxNoTripleCard N (f N)) :\n    ¬ Tendsto (fun N : ℕ => (f N : ℝ) / N) atTop (𝓝 ((1 : ℝ) / 2)) := by\n  sorry\n\n/--\nOne can take either $A$ to be all odd integers in $[1,N]$ or all integers in $[N/2,N]$ to show\n$f(N)\\geq (1/2+o(1))N$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_302.variants.lower_half (f : ℕ → ℕ) (hf : ∀ N, IsMaxNoTripleCard N (f N))\n    (ε : ℝ) (hε : 0 < ε) :\n    ∀ᶠ N : ℕ in atTop, ((1 : ℝ) / 2 - ε) * N ≤ f N := by\n  refine Filter.Eventually.of_forall fun N => ?_\n  set A : Finset ℕ := (Finset.range ((N + 1) / 2)).image (fun x => 2 * x + 1) with hA\n  have hsub : A ⊆ Finset.Icc 1 N := by\n    intro a ha\n    obtain ⟨x, hx, rfl⟩ := Finset.mem_image.1 ha\n    rw [Finset.mem_range] at hx\n    rw [Finset.mem_Icc]\n    omega\n  have hno : NoUnitFractionTriple A := by\n    intro a ha b hb c hc _ _ _ h\n    obtain ⟨x, -, rfl⟩ := Finset.mem_image.1 ha\n    obtain ⟨y, -, rfl⟩ := Finset.mem_image.1 hb\n    obtain ⟨z, -, rfl⟩ := Finset.mem_image.1 hc\n    have hx : ((2 * x + 1 : ℕ) : ℚ) ≠ 0 := by positivity\n    have hy : ((2 * y + 1 : ℕ) : ℚ) ≠ 0 := by positivity\n    have hz : ((2 * z + 1 : ℕ) : ℚ) ≠ 0 := by positivity\n    field_simp at h\n    have h' : (2 * y + 1) * (2 * z + 1) = (2 * x + 1) * (2 * z + 1 + (2 * y + 1)) := by\n      exact_mod_cast h\n    have := congrArg (· % 2) h'\n    simp [Nat.mul_mod, Nat.add_mod] at this\n  have hcard : A.card = (N + 1) / 2 := by\n    rw [hA, Finset.card_image_of_injective _ (fun x y hxy => by simpa using hxy),\n      Finset.card_range]\n  have hle : (N + 1) / 2 ≤ f N := by\n    rw [← hcard]\n    exact (hf N).2 ⟨A, hsub, hno, rfl⟩\n  have h1 : (N : ℝ) ≤ 2 * ((N + 1) / 2 : ℕ) := by\n    exact_mod_cast (by omega : N ≤ 2 * ((N + 1) / 2))\n  have h2 : (((N + 1) / 2 : ℕ) : ℝ) ≤ f N := by exact_mod_cast hle\n  have hN : (0 : ℝ) ≤ N := Nat.cast_nonneg N\n  nlinarith\n\n/--\nStijn Cambie has observed that\n$$f(N)\\geq (5/8+o(1))N,$$\ntaking $A$ to be all odd integers $\\leq N/4$ and all integers in $[N/2,N]$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_302.variants.lower_five_eighths (f : ℕ → ℕ) (hf : ∀ N, IsMaxNoTripleCard N (f N))\n    (ε : ℝ) (hε : 0 < ε) :\n    ∀ᶠ N : ℕ in atTop, ((5 : ℝ) / 8 - ε) * N ≤ f N := by\n  sorry\n\n/--\nWouter van Doorn has proved [va25] that\n$$f(N) \\leq (9/10+o(1))N.$$\n-/\n@[category research solved, AMS 11]\ntheorem erdos_302.variants.upper_nine_tenths (f : ℕ → ℕ) (hf : ∀ N, IsMaxNoTripleCard N (f N))\n    (ε : ℝ) (hε : 0 < ε) :\n    ∀ᶠ N : ℕ in atTop, (f N : ℝ) ≤ ((9 : ℝ) / 10 + ε) * N := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nKenta Kitamura (KitaKen1 on GitHub) has given a Lean proof\n([erdos-302-upper-bound](https://github.com/KitaKen1/erdos-302-upper-bound)) that\n$$f(N) \\leq (0.8461739827964010+o(1))N.$$\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/KitaKen1/erdos-302-upper-bound/blob/9447ceb/lean/Erdos302ReflectiveUpperFC.lean#L92-L99\"]\ntheorem erdos_302.variants.upper_0_8461739827964010 (f : ℕ → ℕ)\n    (hf : ∀ N, IsMaxNoTripleCard N (f N)) (ε : ℝ) (hε : 0 < ε) :\n    ∀ᶠ N : ℕ in atTop, (f N : ℝ) ≤ ((8461739827964010 : ℝ) / 10000000000000000 + ε) * N := by\n  sorry\n\nend Erdos302\n",
  "statement_hash": "e21d9ae799c5ff8b9d4e5bb7edf91e99b9ddd3f63c0c791e41e608a40ff14c27",
  "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."
}