{
  "id": "3228",
  "ident": "NS.03228",
  "slug": "erdos-793",
  "title": "Erdős Problem 793",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $F(n)$ be the maximum possible size of a subset $A \\subseteq \\{1, \\ldots, n\\}$ such that\n$a \\nmid bc$ whenever $a, b, c \\in A$ with $a \\neq b$ and $a \\neq c$. Is there a constant $c$ such\nthat\n$$F(n) = \\pi(n) + (c + o(1)) n^{2/3} (\\log n)^{-2}?$$\n\nA problem of Erdős [Er69, Er70b], who proved in [Er38] that\n$F(n) = \\pi(n) + O(n^{2/3} (\\log n)^{-2})$. The answer is yes, with $c = 27/2$: this was proved by\nGPT-5.6 Sol (prompted by Chojecki), refining the argument of [Er38]; see\n`erdos_793.variants.constant`.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos793.erdos_793",
  "statement_lean": "theorem erdos_793 :\n    ∃ c : ℝ, Tendsto (fun n : ℕ ↦ ((F n : ℝ) - Nat.primeCounting n) /\n      ((n : ℝ) ^ ((2 : ℝ) / 3) / (log n) ^ 2)) atTop (𝓝 c)",
  "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-/\n\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 793\n\n*References:*\n- [erdosproblems.com/793](https://www.erdosproblems.com/793)\n- [Er38] Erdős, P., *On sequences of integers no one of which divides the product of two others\n  and on related problems*. Tomsk. Gos. Univ. Ucen Zap. (1938), 74-82.\n- [Er69] Erdős, Paul, *Some applications of graph theory to number theory*. The Many Facets of\n  Graph Theory (Proc. Conf., Western Mich. Univ., Kalamazoo, Mich., 1968) (1969), 77-82.\n- [Er70b] Erdős, P., *Some applications of graph theory to number theory*. Proc. Second Chapel Hill\n  Conf. on Combinatorial Mathematics and its Applications (Univ. North Carolina, Chapel Hill, N.C.,\n  1970) (1970), 136-145.\n-/\n\n@[expose] public section\n\nopen Filter Real\nopen scoped Topology\n\nnamespace Erdos793\n\n/-- A finite set `A ⊆ ℕ` is *strongly 2-primitive* if `a ∤ b * c` whenever `a, b, c ∈ A` with\n`a ≠ b` and `a ≠ c`. -/\ndef Strongly2Primitive (A : Finset ℕ) : Prop :=\n  ∀ a ∈ A, ∀ b ∈ A, ∀ c ∈ A, a ≠ b → a ≠ c → ¬ a ∣ b * c\n\n/-- `F n` is the maximal size of a strongly 2-primitive subset of `{1, …, n}`. -/\nnoncomputable def F (n : ℕ) : ℕ := by\n  classical\n  exact ((Finset.Icc 1 n).powerset.filter Strongly2Primitive).sup Finset.card\n\n/--\nLet $F(n)$ be the maximum possible size of a subset $A \\subseteq \\{1, \\ldots, n\\}$ such that\n$a \\nmid bc$ whenever $a, b, c \\in A$ with $a \\neq b$ and $a \\neq c$. Is there a constant $c$ such\nthat\n$$F(n) = \\pi(n) + (c + o(1)) n^{2/3} (\\log n)^{-2}?$$\n\nA problem of Erdős [Er69, Er70b], who proved in [Er38] that\n$F(n) = \\pi(n) + O(n^{2/3} (\\log n)^{-2})$. The answer is yes, with $c = 27/2$: this was proved by\nGPT-5.6 Sol (prompted by Chojecki), refining the argument of [Er38]; see\n`erdos_793.variants.constant`.\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_793 :\n    ∃ c : ℝ, Tendsto (fun n : ℕ ↦ ((F n : ℝ) - Nat.primeCounting n) /\n      ((n : ℝ) ^ ((2 : ℝ) / 3) / (log n) ^ 2)) atTop (𝓝 c) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe constant in Problem 793 is $c = 27/2$, i.e.\n$$F(n) = \\pi(n) + \\left(\\frac{27}{2} + o(1)\\right) \\frac{n^{2/3}}{(\\log n)^2}.$$\nFormalised by van Doorn and Aristotle, following the proof of GPT-5.6 Sol.\n-/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos793.lean#L25\"]\ntheorem erdos_793.variants.constant :\n    Tendsto (fun n : ℕ ↦ ((F n : ℝ) - Nat.primeCounting n) /\n      ((n : ℝ) ^ ((2 : ℝ) / 3) / (log n) ^ 2)) atTop (𝓝 (27 / 2)) := by\n  sorry\n\nend Erdos793\n",
  "statement_hash": "f65501b39ea6f8e14288f781884ccc7c60e863129f72ee34a272242f93e09453",
  "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."
}