{
  "id": "3560",
  "ident": "NS.03560",
  "slug": "erdos-9",
  "title": "Erdős Problem 9",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "The set is known to be infinite. In [Er77c] Erdős credits Schinzel with proving that there are\ninfinitely many odd integers not of this form, but gives no reference.\n\n[Er77c] Erdős, P., _Problems and results on combinatorial number theory. III._.",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/9",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos9.erdos_9.variants.infinite",
  "statement_lean": "theorem erdos_9.variants.infinite : Erdos9A.Infinite",
  "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 9\n\n*Reference:* [erdosproblems.com/9](https://www.erdosproblems.com/9)\n-/\n\n@[expose] public section\n\nnamespace Erdos9\n\n/--\nThe set of odd numbers that cannot be expressed as a prime plus two powers of 2.\n-/\ndef Erdos9A : Set ℕ := { n | Odd n ∧ ¬ ∃ (p k l : ℕ), (Nat.Prime p) ∧ n = p + 2 ^ k + 2 ^ l }\n\n\n@[category test, AMS 5 11]\ntheorem erdos9A_contains_one : 1 ∈ Erdos9A := by\n  constructor\n  · decide\n  · push Not\n    intro p k l hp\n    linarith [Nat.Prime.two_le hp, @Nat.one_le_two_pow k, @Nat.one_le_two_pow l]\n\n@[category test, AMS 5 11]\ntheorem erdos9A_contains_three : 3 ∈ Erdos9A := by\n  constructor\n  · decide\n  · push Not\n    intro p k l hp\n    linarith [Nat.Prime.two_le hp, @Nat.one_le_two_pow k, @Nat.one_le_two_pow l]\n\n@[category test, AMS 5 11]\ntheorem erdos9A_not_contains_five : 5 ∉ Erdos9A := by\n  unfold Erdos9A\n  simp only [exists_and_left, not_exists, not_and, Set.mem_ofPred_eq, not_forall, Decidable.not_not]\n  intro\n  use 3, Nat.prime_three, 0, 0\n  simp only [pow_zero, Nat.reduceAdd]\n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe set is known to be infinite. In [Er77c] Erdős credits Schinzel with proving that there are\ninfinitely many odd integers not of this form, but gives no reference.\n\n[Er77c] Erdős, P., _Problems and results on combinatorial number theory. III._.\n-/\n@[category research solved, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/linrock/math-proofs/blob/de08009e59829727653bfa20b8d8f7ed1b1baf79/erdos-9/Solution.lean#L25\"]\ntheorem erdos_9.variants.infinite : Erdos9A.Infinite := by\n  sorry\n\n/--\nIs the upper density of the set of odd numbers that cannot be expressed as a prime plus\ntwo powers of 2 positive?\n-/\n@[category research open, question, AMS 5 11]\ntheorem erdos_9 : 0 < Erdos9A.upperDensity := by\n  sorry\n\nend Erdos9\n",
  "statement_hash": "81dfbb4728a66d4f18c3e23aef0f883f2f9b9a85834d6cee2e694c61e18e1c3e",
  "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."
}