{
  "id": "1765",
  "ident": "NS.01765",
  "slug": "erdos-340",
  "title": "Erdős Problem 340",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $A = \\{1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, \\ldots\\}$ be the greedy Sidon sequence:\nwe begin with $1$ and iteratively include the next smallest integer that preserves the\nSidon property (i.e. there are no non-trivial solutions to $a + b = c + d$). What is the\norder of growth of $A$? Is it true that $|A \\cap \\{1, \\ldots, N\\}| \\gg N^{1/2 - \\varepsilon}$\nfor all $\\varepsilon > 0$ and large $N$?",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/340",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos340.erdos_340",
  "statement_lean": "theorem erdos_340 (ε : ℝ) (hε : ε > 0) :\n    (fun n : ℕ ↦ √n / n ^ ε) =O[atTop]\n      fun n : ℕ ↦ ((Set.range greedySidon ∩ Set.Icc 1 n).ncard : ℝ)",
  "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\nmeta import FormalConjecturesForMathlib.Combinatorics.Basic\n\n/-!\n# Erdős Problem 340\n\n*Reference:* [erdosproblems.com/340](https://www.erdosproblems.com/340)\n-/\n\n@[expose] public section\n\nopen Filter Finset\nopen scoped Real Pointwise\n\nnamespace Erdos340\n\n@[category test, AMS 5]\ntheorem greedySidon_go_singleton_two : (greedySidon.go {1} (by simp [IsSidon]) 2).val = 2 := by\n  norm_num [greedySidon, greedySidon.aux, greedySidon.go, Nat.find_eq_iff, IsSidon]\n  lia\n\n@[category test, AMS 5]\ntheorem greedySidon_go_pair_three : (greedySidon.go {1, 2} (by simp [IsSidon]) 3).val = 4 := by\n  norm_num [greedySidon, greedySidon.aux, greedySidon.go, Nat.find_eq_iff, IsSidon]\n  lia\n\n@[category test, AMS 5]\ntheorem greedySidon_zero : greedySidon 0 = 1 := rfl\n\n@[category test, AMS 5]\ntheorem greedySidon_one : greedySidon 1 = 2 := by\n  simp [greedySidon, greedySidon.aux, greedySidon.go]\n  norm_num [Nat.find_eq_iff, IsSidon]\n  lia\n\n@[category test, AMS 5]\ntheorem greedySidon_two : greedySidon 2 = 4 := by\n  decide +native\n\n@[category test, AMS 5]\ntheorem greedySidon_three : greedySidon 3 = 8 := by\n  decide +native\n@[category test, AMS 5]\ntheorem greedySidon_four : greedySidon 4 = 13 := by\n  decide +native\n\n@[category test, AMS 5]\ntheorem greedySidon_five : greedySidon 5 = 21 := by\n  decide +native\n\n@[category test, AMS 5]\ntheorem greedySidon_ten : greedySidon 10 = 97 := by\n  decide +native\n\n/--\nLet $A = \\{1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, \\ldots\\}$ be the greedy Sidon sequence:\nwe begin with $1$ and iteratively include the next smallest integer that preserves the\nSidon property (i.e. there are no non-trivial solutions to $a + b = c + d$). What is the\norder of growth of $A$? Is it true that $|A \\cap \\{1, \\ldots, N\\}| \\gg N^{1/2 - \\varepsilon}$\nfor all $\\varepsilon > 0$ and large $N$?\n-/\n@[category research open, AMS 5]\ntheorem erdos_340 (ε : ℝ) (hε : ε > 0) :\n    (fun n : ℕ ↦ √n / n ^ ε) =O[atTop]\n      fun n : ℕ ↦ ((Set.range greedySidon ∩ Set.Icc 1 n).ncard : ℝ) := by\n  sorry\n\ndef erdos_340.variants.isTheta.answer : ℕ → ℝ := sorry\n\n/--\nLet $A = \\{1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, \\ldots\\}$ be the greedy Sidon sequence:\nwe begin with $1$ and iteratively include the next smallest integer that preserves the\nSidon property (i.e. there are no non-trivial solutions to $a + b = c + d$). What is the\norder of growth of $A$? Is it true that $|A \\cap \\{1, \\ldots, N\\}| \\gg N^{1/2 - \\varepsilon}$\nfor all $\\varepsilon > 0$ and large $N$?\n-/\n@[category research open, question value, AMS 5]\ntheorem erdos_340.variants.isTheta (ε : ℝ) (hε : ε > 0) :\n    (fun n : ℕ ↦ ((Set.range greedySidon ∩ Set.Icc 1 n).ncard : ℝ)) =Θ[atTop]\n      erdos_340.variants.isTheta.answer := by\n  sorry\n\n/--\nIt is trivial that this sequence grows at least like $\\gg N^{1/3}$.\n-/\n@[category textbook, AMS 5]\ntheorem erdos_340.variants.third (ε : ℝ) (hε : ε > 0) :\n    (fun n : ℕ ↦ (n : ℝ) ^ ((1 : ℝ) / 3)) =O[atTop]\n      fun n : ℕ ↦ ((Set.range greedySidon ∩ Set.Icc 1 n).ncard : ℝ) := by\n  sorry\n\n/--\nErdős and Graham [ErGr80] also asked about the difference set $A - A$ and whether this has\npositive density.\n\n[ErGr80] Erdős, P. and Graham, R., Old and new problems and results in combinatorial number\ntheory. Monographies de L'Enseignement Mathematique (1980).\n-/\n@[category research open, AMS 5]\ntheorem erdos_340.variants.sub_hasPosDensity :\n    Set.HasPosDensity (Set.range greedySidon - Set.range greedySidon) := by\n  sorry\n\n/--\nErdős and Graham [ErGr80] also asked about the difference set $A - A$ and whether this\ncontains $22$, which it does.\n\n[ErGr80] Erdős, P. and Graham, R., Old and new problems and results in combinatorial number\ntheory. Monographies de L'Enseignement Mathematique (1980).\n-/\n@[category research solved, AMS 5]\ntheorem erdos_340.variants._22_mem_sub :\n    22 ∈ Set.range greedySidon - Set.range greedySidon := by\n  have h : (22 : ℕ) = greedySidon 14 - greedySidon 13 := by decide +native\n  rw [h]\n  exact Set.sub_mem_sub (Set.mem_range_self 14) (Set.mem_range_self 13)\n\n/--\nThe smallest integer which is unknown to be in $A - A$ is $33$.\n -/\n@[category research open, question, AMS 5]\ntheorem erdos_340.variants._33_mem_sub :\n    33 ∈ Set.range greedySidon - Set.range greedySidon := by\n  sorry\n\n-- Formalisation note: there is some slight ambiguity in the meaning of\n-- \"almost all\" so we provide two variants for \"all but finitely many\"\n-- and \"outside of a set of density zero\"; there may be other reasonable\n-- interpretations\n/--\nIt may be true that all or almost all integers are in $A - A$.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_340.variants.cofinite_sub :\n    ∀ᶠ n in cofinite, n ∈ Set.range greedySidon - Set.range greedySidon := by\n  sorry\n\n/--\nIt may be true that all or almost all integers are in $A - A$.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_340.variants.co_density_zero_sub :\n    ∃ S : Set ℕ, S.HasDensity 0 ∧ ∀ n ∈ Sᶜ, n ∈ Set.range greedySidon - Set.range greedySidon := by\n  sorry\n\nend Erdos340\n",
  "statement_hash": "f946f83d51e7c1dede868cf41b2ea6c3ab6389fd8c477c38f3a28546b76efd50",
  "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."
}