{
  "id": "1773",
  "ident": "NS.01773",
  "slug": "erdos-341",
  "title": "Erdős Problem 341",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $A=\\{a_1 < \\cdots < a_k\\}$ be a finite set of positive integers and extend it to an infinite\nsequence $\\overline{A}=\\{a_1 < a_2 < \\cdots \\}$ by defining $a_{n+1}$ for $n \\geq k$ to be\nthe least integer exceeding $a_n$ which is not of the form $a_i + a_j$ with $i,j \\leq n$.\nIs it true that the sequence of differences $a_{m+1}-a_m$ is eventually periodic?\n\nThis problem is discussed under Problem 7 on Green's open problems list.\n\nThe answer is no: Li [Li26] (with GPT-5.6 Sol) showed that the greedy extension of the seed set\n$A = \\{1, 2, 3, 5, 7, 13, 22, 27, 28, 32, 36, 40, 47, 48, 52, 63, 71, 77, 81, 89, 97\\}$ has a\nsequence of differences that is not eventually periodic. The linked formal proof\nexhibits such a sequence `a : ℕ → ℕ` (strictly increasing, with the greedy rule holding from\nsome index on, and with `n ↦ a (n + 1) - a n` not eventually periodic), which is a\ncounterexample to the statement below.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos341.erdos_341",
  "statement_lean": "theorem erdos_341 :\n    ¬ ∀ (a : ℕ → ℕ), StrictMono a → 0 < a 0 →\n      (∀ᶠ n in atTop,\n        IsLeast { x | a n < x ∧ x ∉ { a i + a j | (i ≤ n) (j ≤ n) } } (a (n + 1))) →\n      let d := fun i ↦ (a (i + 1) : ℤ) - a i\n      ∃ p > 0, ∀ᶠ m in atTop, d (m + p) = d m",
  "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 341\n\n*References:*\n* [erdosproblems.com/341](https://www.erdosproblems.com/341)\n* [Ben Green's Open Problem 7](https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#section.1)\n* [Li26] Li, Z., *Counterexamples to Erdős Problem 341* (2026),\n  https://github.com/LiAlreadyExists/Erdos-341/blob/main/paper/Erdos341.pdf\n-/\n\n@[expose] public section\n\nopen Nat Set Filter\nopen scoped Topology\n\nnamespace Erdos341\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $A=\\{a_1 < \\cdots < a_k\\}$ be a finite set of positive integers and extend it to an infinite\nsequence $\\overline{A}=\\{a_1 < a_2 < \\cdots \\}$ by defining $a_{n+1}$ for $n \\geq k$ to be\nthe least integer exceeding $a_n$ which is not of the form $a_i + a_j$ with $i,j \\leq n$.\nIs it true that the sequence of differences $a_{m+1}-a_m$ is eventually periodic?\n\nThis problem is discussed under Problem 7 on Green's open problems list.\n\nThe answer is no: Li [Li26] (with GPT-5.6 Sol) showed that the greedy extension of the seed set\n$A = \\{1, 2, 3, 5, 7, 13, 22, 27, 28, 32, 36, 40, 47, 48, 52, 63, 71, 77, 81, 89, 97\\}$ has a\nsequence of differences that is not eventually periodic. The linked formal proof\nexhibits such a sequence `a : ℕ → ℕ` (strictly increasing, with the greedy rule holding from\nsome index on, and with `n ↦ a (n + 1) - a n` not eventually periodic), which is a\ncounterexample to the statement below.\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos341.lean#L12\"]\ntheorem erdos_341 :\n    ¬ ∀ (a : ℕ → ℕ), StrictMono a → 0 < a 0 →\n      (∀ᶠ n in atTop,\n        IsLeast { x | a n < x ∧ x ∉ { a i + a j | (i ≤ n) (j ≤ n) } } (a (n + 1))) →\n      let d := fun i ↦ (a (i + 1) : ℤ) - a i\n      ∃ p > 0, ∀ᶠ m in atTop, d (m + p) = d m := by\n  sorry\n\nend Erdos341\n",
  "statement_hash": "ce234d35b2ecfd2feba476e892c6ac60fcd503f5440aa6e63641e3465b1e9520",
  "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."
}