{
  "id": "2107",
  "ident": "NS.02107",
  "slug": "erdos-424",
  "title": "Erdős Problem 424: Sequence generated by $a_i a_j - 1$",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $a_1 = 2$ and $a_2 = 3$ and continue the sequence by appending to $a_1, \\ldots, a_n$ all possible\nvalues of $a_i a_j - 1$ with $i \\neq j$.\nIs it true that the set of integers which eventually appear has positive density?\n\nAs explained on [erdosproblems.com/424](https://www.erdosproblems.com/424), \"positive density\"\nhere means positive *lower* density: is there $c > 0$ such that for all large $x$ at least\n$cx$ of the integers in $[1, x]$ appear? See `erdos_424.variants.exact_density` for the\nliteral reading.\n\nThe answer is yes: Korsky [Ko26] (with ChatGPT 5.6 Pro) proved that the set has positive lower\ndensity. The linked formal proof (Alexeev and Codex) shows that there is `c > 0` with\n`c * x ≤ #{n ∈ [1, x] | n ∈ generatedSet}` for all large `x`, which gives\n`c / 2 ≤ generatedSet.lowerDensity`.",
  "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": "Erdos424.erdos_424",
  "statement_lean": "theorem erdos_424 : 0 < generatedSet.lowerDensity",
  "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 424: Sequence generated by $a_i a_j - 1$\n\n*References:*\n - [erdosproblems.com/424](https://www.erdosproblems.com/424)\n - [A5244](https://oeis.org/A5244)\n - [Ben Green's Open Problem 63](https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#section.8 Problem 63)\n - [Ko26] Korsky, S., *A problem of Erdős on the sequence $a_ia_j - 1$*,\n   [arXiv:2608.07910](https://arxiv.org/abs/2608.07910)\n-/\n\n@[expose] public section\n\nnamespace Erdos424\n\nopen Set\n\n/--\nDefines the set of new numbers generated from a set A by the operation\n$x y - 1$ for $x \\neq y$.\n-/\ndef nextGeneration (A : Set ℕ) : Set ℕ :=\n  { z : ℕ | ∃ x y, x ∈ A ∧ y ∈ A ∧ x ≠ y ∧ z = x * y - 1 }\n\n/--\nThe sequence of sets $A_n$ where $A_0 = \\{2, 3\\}$ and $A_{n+1}$ is $A_n$ union all newly\ngenerated elements.\n-/\ndef sequenceSet : ℕ → Set ℕ\n  | 0 => {2, 3}\n  | n + 1 => (sequenceSet n) ∪ (nextGeneration (sequenceSet n))\n\n/-- The set of integers which eventually appear in the sequence, which is the union of all $A_n$. -/\ndef generatedSet : Set ℕ := ⋃ n : ℕ, sequenceSet n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $a_1 = 2$ and $a_2 = 3$ and continue the sequence by appending to $a_1, \\ldots, a_n$ all possible\nvalues of $a_i a_j - 1$ with $i \\neq j$.\nIs it true that the set of integers which eventually appear has positive density?\n\nAs explained on [erdosproblems.com/424](https://www.erdosproblems.com/424), \"positive density\"\nhere means positive *lower* density: is there $c > 0$ such that for all large $x$ at least\n$cx$ of the integers in $[1, x]$ appear? See `erdos_424.variants.exact_density` for the\nliteral reading.\n\nThe answer is yes: Korsky [Ko26] (with ChatGPT 5.6 Pro) proved that the set has positive lower\ndensity. The linked formal proof (Alexeev and Codex) shows that there is `c > 0` with\n`c * x ≤ #{n ∈ [1, x] | n ∈ generatedSet}` for all large `x`, which gives\n`c / 2 ≤ generatedSet.lowerDensity`.\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/Erdos424.lean#L6409\"]\ntheorem erdos_424 : 0 < generatedSet.lowerDensity := by\n  sorry\n\n/--\nA literal interpretation of \"positive density\": the natural density of `generatedSet` exists\n(i.e. the lower and upper density agree) and is positive.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_424.variants.exact_density : generatedSet.HasPosDensity := by\n  sorry\n\n-- TODO(firsching): formalize the statements from the additional material\n\nend Erdos424\n",
  "statement_hash": "c50ef1a3bf6bf1299e253f64bdc98bc8012b53a71a9de33ce19d777e3790027f",
  "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."
}