{
  "id": "3416",
  "ident": "NS.03416",
  "slug": "erdos-858",
  "title": "Erdős Problem 858",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $A\\subseteq \\{1,\\ldots,N\\}$ be such that there is no solution to $at=b$ with $a,b\\in A$ and\nthe smallest prime factor of $t$ is $>a$. Estimate the maximum of\n$$\\frac{1}{\\log N}\\sum_{n\\in A}\\frac{1}{n}.$$\n\nThis has been solved by Chojecki and GPT-5.4 Pro, who show that for large $N$\n$$\\max_A \\sum_{n\\in A}\\frac{1}{n}=(c+o(1))\\log N$$\nwhere the maximum is over all $A\\subseteq \\{1,\\ldots,N\\}$ with the stated property and\n$c\\approx 0.618\\cdots$ is an explicit constant.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos858.erdos_858",
  "statement_lean": "theorem erdos_858 : ∃ c : ℝ, Tendsto (fun N : ℕ ↦ M N / log N) atTop (nhds c)",
  "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 858\n\n*References:*\n- [erdosproblems.com/858](https://www.erdosproblems.com/858)\n- [Er70] Erdős, Paul, _Some extremal problems in combinatorial number theory_. Mathematical Essays\n  Dedicated to A. J. Macintyre (1970), 123-133.\n- [Al66] Alexander, Ralph, _Density and multiplicative structure of sets of integers_. Acta\n  Arith. (1966/67), 321--332.\n- [ESS68] Erdős, P. and Sárközi, A. and Szemerédi, E., _On the solvability of certain equations\n  in sequences of positive upper logarithmic density_. J. London Math. Soc. (1968), 71--78.\n- [Be35] Behrend, F., _On sequences of numbers not divisible by another_. London Math. Soc.\n  Journal (1935), 42-45.\n-/\n\n@[expose] public section\n\nopen Filter Real\n\nnamespace Erdos858\n\n/-- `A` has no solution to $at=b$ with $a,b\\in A$ and the smallest prime factor of $t$\ngreater than $a$. -/\ndef IsAdmissible (A : Finset ℕ) : Prop :=\n  ∀ a ∈ A, ∀ b ∈ A, ∀ t : ℕ, a * t = b → t.minFac ≤ a\n\n/-- The maximum of $\\sum_{n\\in A}\\frac{1}{n}$ over all admissible $A\\subseteq \\{1,\\ldots,N\\}$. -/\nnoncomputable def M (N : ℕ) : ℝ :=\n  sSup {m | ∃ A ⊆ Finset.Icc 1 N, IsAdmissible A ∧ ∑ n ∈ A, (1 : ℝ) / n = m}\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $A\\subseteq \\{1,\\ldots,N\\}$ be such that there is no solution to $at=b$ with $a,b\\in A$ and\nthe smallest prime factor of $t$ is $>a$. Estimate the maximum of\n$$\\frac{1}{\\log N}\\sum_{n\\in A}\\frac{1}{n}.$$\n\nThis has been solved by Chojecki and GPT-5.4 Pro, who show that for large $N$\n$$\\max_A \\sum_{n\\in A}\\frac{1}{n}=(c+o(1))\\log N$$\nwhere the maximum is over all $A\\subseteq \\{1,\\ldots,N\\}$ with the stated property and\n$c\\approx 0.618\\cdots$ is an explicit constant.\n-/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos858.lean#L4771\"]\ntheorem erdos_858 : ∃ c : ℝ, Tendsto (fun N : ℕ ↦ M N / log N) atTop (nhds c) := by\n  sorry\n\n/-- The limit $c\\approx 0.618\\cdots$ is positive: for any fixed large $N$ the maximum is bounded\naway from $0$ (Alexander [Al66], Erdős–Sárközi–Szemerédi [ESS68]). -/\n@[category research solved, AMS 11]\ntheorem erdos_858.variants.positive :\n    ∃ c : ℝ, 0 < c ∧ Tendsto (fun N : ℕ ↦ M N / log N) atTop (nhds c) := by\n  sorry\n\nopen scoped Classical in\n/--\nAlexander [Al66] and Erdős, Sárközi, and Szemerédi [ESS68] proved that if $A$ is an infinite set\nwith this property then $\\sum_{n\\in A\\cap [1,N]}\\frac{1}{n}=o(\\log N)$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_858.variants.infinite (A : Set ℕ) (hA : A.Infinite) (h0 : 0 ∉ A)\n    (hadm : ∀ a ∈ A, ∀ b ∈ A, ∀ t : ℕ, a * t = b → t.minFac ≤ a) :\n    (fun N : ℕ ↦ ∑ n ∈ (Finset.Icc 1 N).filter (· ∈ A), (1 : ℝ) / n) =o[atTop]\n      fun N : ℕ ↦ log N := by\n  sorry\n\nend Erdos858\n",
  "statement_hash": "1fa45f0a3f625c6fbdfd804bb8bef62113ad80fbdc247e916404d132121cc246",
  "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."
}