{
  "id": "3507",
  "ident": "NS.03507",
  "slug": "erdos-883",
  "title": "Erdős Problem 883",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "For $A\\subseteq \\{1,\\ldots,n\\}$ let $G(A)$ be the graph with vertex set $A$, where two\nintegers are joined by an edge if they are coprime.\n\nIs it true that if\n$$|A| > \\lfloor n/2 \\rfloor + \\lfloor n/3 \\rfloor - \\lfloor n/6 \\rfloor$$\nthen $G(A)$ contains all odd cycles of length $\\leq n/3 + 1$?\n\nA problem of Erdős and Sárközy [ErSa97].",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos883.erdos_883.parts.i",
  "statement_lean": "theorem erdos_883.parts.i :\n    ∀ (n : ℕ) (A : Finset ℕ),\n      A ⊆ Finset.Icc 1 n →\n      n / 2 + n / 3 - n / 6 < A.card →\n      ∀ l : ℕ, Odd l → 3 ≤ l → l ≤ n / 3 + 1 →\n        l ∈ (coprimeGraph.induce (A : Set ℕ)).oddCycleLengths",
  "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 883\n\n*References:*\n- [erdosproblems.com/883](https://www.erdosproblems.com/883)\n- [ErSa97] Erdős, P. and Sárközy, G. N., On cycles in the coprime graph of integers.\n  Electron. J. Combin. (1997), Research Paper 8.\n- [Sa99] Sárközy, G. N., Complete tripartite subgraphs in the coprime graph of integers.\n  Discrete Math. (1999), 227-238.\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Erdos883\n\n/--\nThe coprime graph on $\\mathbb{N}$: two integers are joined by an edge if they are coprime.\n-/\ndef coprimeGraph : SimpleGraph ℕ :=\n  SimpleGraph.fromRel Nat.Coprime\n\n/--\nFor $A\\subseteq \\{1,\\ldots,n\\}$ let $G(A)$ be the graph with vertex set $A$, where two\nintegers are joined by an edge if they are coprime.\n\nIs it true that if\n$$|A| > \\lfloor n/2 \\rfloor + \\lfloor n/3 \\rfloor - \\lfloor n/6 \\rfloor$$\nthen $G(A)$ contains all odd cycles of length $\\leq n/3 + 1$?\n\nA problem of Erdős and Sárközy [ErSa97].\n-/\n@[category research open, question, AMS 5 11]\ntheorem erdos_883.parts.i :\n    ∀ (n : ℕ) (A : Finset ℕ),\n      A ⊆ Finset.Icc 1 n →\n      n / 2 + n / 3 - n / 6 < A.card →\n      ∀ l : ℕ, Odd l → 3 ≤ l → l ≤ n / 3 + 1 →\n        l ∈ (coprimeGraph.induce (A : Set ℕ)).oddCycleLengths := by\n  sorry\n\nopen scoped Classical in\n/--\nIs it true that, for every $\\ell\\geq 1$, if $n$ is sufficiently large and\n$$|A| > \\lfloor n/2\\rfloor + \\lfloor n/3\\rfloor - \\lfloor n/6\\rfloor$$\nthen $G(A)$ must contain a complete $(1,\\ell,\\ell)$ tripartite graph on $2\\ell+1$ vertices?\n\nThe second question was solved by Sárközy [Sa99], who proved this with\n$\\ell \\gg \\log n/\\log\\log n$.\n-/\n@[category research solved, question, AMS 5 11]\ntheorem erdos_883.parts.ii :\n    ∀ l : ℕ, 1 ≤ l → ∀ᶠ n : ℕ in atTop, ∀ A : Finset ℕ,\n      A ⊆ Finset.Icc 1 n →\n      n / 2 + n / 3 - n / 6 < A.card →\n      (SimpleGraph.completeMultipartiteGraph (fun i : Fin 3 ↦ Fin (![1, l, l] i))).IsContained\n        (coprimeGraph.induce (A : Set ℕ)) := by\n  sorry\n\nend Erdos883\n",
  "statement_hash": "61e9a9be02697a1f9c8a7459e7170eda653fbb62237ed468761dfbbac58bfe9b",
  "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."
}