{
  "id": "2155",
  "ident": "NS.02155",
  "slug": "erdos-441",
  "title": "Erdős Problem 441",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $N\\geq 1$. What is the size of the largest $A\\subset \\{1,\\ldots,N\\}$ such that $[a,b]\\leq N$\nfor all $a,b\\in A$, where $[a,b]$ is the least common multiple of $a$ and $b$?\n\nIs it attained by choosing all integers in $[1,(N/2)^{1/2}]$ together with all even integers in\n$[(N/2)^{1/2},(2N)^{1/2}]$?\n\nLet $g(N)$ denote the size of the largest such $A$. The construction mentioned proves that\n$g(N) \\geq \\left(\\tfrac{9}{8}N\\right)^{1/2}+O(1)$. Erdős [Er51b] proved\n$g(N) \\leq (4N)^{1/2}+O(1)$, which was improved by Choi [Ch72b]. Chen [Ch98] established the\nasymptotic $g(N) \\sim \\left(\\tfrac{9}{8}N\\right)^{1/2}$. Chen and Dai [DaCh06] proved that\n$$g(N)\\leq \\left(\\tfrac{9}{8}N\\right)^{1/2}+\nO\\left(\\left(\\frac{N}{\\log N}\\right)^{1/2}\\log\\log N\\right).$$\n\nIn [ChDa07] the same authors prove that, infinitely often, Erdős' construction is not optimal: if\n$B$ is that construction and $A$ is such that $\\lvert A\\rvert=g(N)$ then, for infinitely many\n$N$, $\\lvert A\\rvert\\geq \\lvert B\\rvert+t-2$, where $t\\geq 0$ is defined such that the $t$-fold\niterated logarithm of $N$ is in $[0,1)$. (erdosproblems.com omits the $-2$; [ChDa07] proves\nthe bound with it.)\n\nThis is discussed in problems B26 and E2 of Guy's collection [Gu04].",
  "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": "Erdos441.erdos_441",
  "statement_lean": "theorem erdos_441 :\n    ¬ ∀ N : ℕ, 1 ≤ N → g N = (erdosConstruction N).card",
  "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 441\n\n*References:*\n- [erdosproblems.com/441](https://www.erdosproblems.com/441)\n- [Er51b] P. Erdős, *Problem*. Mat. Lapok (1951), 233.\n- [Er65] Erdős, P., *Extremal problems in number theory*. Proc. Sympos. Pure Math., Vol. VIII\n  (1965), 181-189.\n- [Er73] Erdős, P., *Problems and results on combinatorial number theory*. A survey of\n  combinatorial theory (Proc. Internat. Sympos., Colorado State Univ., Fort Collins, Colo., 1971)\n  (1973), 117-138.\n- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number\n  theory*. Monographies de L'Enseignement Mathematique (1980).\n- [Er98] Erdős, Paul, *Some of my new and almost new problems and results in combinatorial number\n  theory*. Number theory (Eger, 1996) (1998), 169-180.\n- [Ch72b] Choi, S. L. G., *The largest subset in $[1,n]$ whose integers have pairwise L.C.M. not\n  exceeding $n$*. Mathematika (1972), 221-230.\n- [Ch98] Chen, Yong-Gao, *Sequences with bounded l.c.m. of each pair of terms*. Acta Arith.\n  (1998), 71-95.\n- [DaCh06] Dai, Li-Xia and Chen, Yong-Gao, *Sequences with bounded l.c.m. of each pair of terms.\n  II*. Acta Arith. (2006), 315-326.\n- [ChDa07] Chen, Yong-Gao and Dai, Li-Xia, *Sequences with bounded l.c.m. of each pair of terms.\n  III*. Acta Arith. (2007), 125-133.\n- [Gu04] Guy, Richard K., *Unsolved problems in number theory*. (2004), xviii+437.\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\n\nnamespace Erdos441\n\n/--\n`g N` is the size of the largest `A ⊆ {1, …, N}` such that `lcm(a, b) ≤ N` for all `a, b ∈ A`.\n-/\nnoncomputable def g (N : ℕ) : ℕ :=\n  sSup {k | ∃ A : Finset ℕ,\n    A ⊆ Finset.Icc 1 N ∧ (∀ a ∈ A, ∀ b ∈ A, Nat.lcm a b ≤ N) ∧ A.card = k}\n\n/--\nErdős' construction: all integers in $[1,(N/2)^{1/2}]$ together with all even integers in\n$[(N/2)^{1/2},(2N)^{1/2}]$.\n-/\ndef erdosConstruction (N : ℕ) : Finset ℕ :=\n  (Finset.Icc 1 N).filter fun a ↦ 2 * a ^ 2 ≤ N ∨ (2 ∣ a ∧ a ^ 2 ≤ 2 * N)\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $N\\geq 1$. What is the size of the largest $A\\subset \\{1,\\ldots,N\\}$ such that $[a,b]\\leq N$\nfor all $a,b\\in A$, where $[a,b]$ is the least common multiple of $a$ and $b$?\n\nIs it attained by choosing all integers in $[1,(N/2)^{1/2}]$ together with all even integers in\n$[(N/2)^{1/2},(2N)^{1/2}]$?\n\nLet $g(N)$ denote the size of the largest such $A$. The construction mentioned proves that\n$g(N) \\geq \\left(\\tfrac{9}{8}N\\right)^{1/2}+O(1)$. Erdős [Er51b] proved\n$g(N) \\leq (4N)^{1/2}+O(1)$, which was improved by Choi [Ch72b]. Chen [Ch98] established the\nasymptotic $g(N) \\sim \\left(\\tfrac{9}{8}N\\right)^{1/2}$. Chen and Dai [DaCh06] proved that\n$$g(N)\\leq \\left(\\tfrac{9}{8}N\\right)^{1/2}+\nO\\left(\\left(\\frac{N}{\\log N}\\right)^{1/2}\\log\\log N\\right).$$\n\nIn [ChDa07] the same authors prove that, infinitely often, Erdős' construction is not optimal: if\n$B$ is that construction and $A$ is such that $\\lvert A\\rvert=g(N)$ then, for infinitely many\n$N$, $\\lvert A\\rvert\\geq \\lvert B\\rvert+t-2$, where $t\\geq 0$ is defined such that the $t$-fold\niterated logarithm of $N$ is in $[0,1)$. (erdosproblems.com omits the $-2$; [ChDa07] proves\nthe bound with it.)\n\nThis is discussed in problems B26 and E2 of Guy's collection [Gu04].\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/Erdos441.lean#L453\"]\ntheorem erdos_441 :\n    ¬ ∀ N : ℕ, 1 ≤ N → g N = (erdosConstruction N).card := by\n  sorry\n\n/--\nChen and Dai [ChDa07] proved that, infinitely often, Erdős' construction is not optimal: for\ninfinitely many $N$, $g(N) \\geq \\lvert B\\rvert+t-2$, where $B$ is the construction and $t\\geq 0$\nis such that the $t$-fold iterated logarithm of $N$ is in $[0,1)$. (erdosproblems.com omits the\n$-2$; [ChDa07] proves the bound with it.)\n-/\n@[category research solved, AMS 11]\ntheorem erdos_441.variants.chen_dai_infinitely_often :\n    ∃ᶠ N : ℕ in atTop, (erdosConstruction N).card + Real.iteratedLog N ≤ g N + 2 := by\n  sorry\n\n/-- Erdős' construction proves that $g(N) \\geq \\left(\\tfrac{9}{8}N\\right)^{1/2}+O(1)$. -/\n@[category research solved, AMS 11]\ntheorem erdos_441.variants.lower_bound :\n    ∃ C : ℝ, ∀ N : ℕ, √(9 / 8 * N) - C ≤ g N := by\n  sorry\n\n/-- Erdős [Er51b] proved $g(N) \\leq (4N)^{1/2}+O(1)$. -/\n@[category research solved, AMS 11]\ntheorem erdos_441.variants.erdos_upper_bound :\n    ∃ C : ℝ, ∀ N : ℕ, (g N : ℝ) ≤ √(4 * N) + C := by\n  sorry\n\n/-- Chen [Ch98] established the asymptotic $g(N) \\sim \\left(\\tfrac{9}{8}N\\right)^{1/2}$. -/\n@[category research solved, AMS 11]\ntheorem erdos_441.variants.chen :\n    (fun N : ℕ ↦ (g N : ℝ)) ~[atTop] fun N ↦ √(9 / 8 * N) := by\n  sorry\n\n/--\nChen and Dai [DaCh06] proved that\n$g(N)\\leq \\left(\\tfrac{9}{8}N\\right)^{1/2}+\nO\\left(\\left(\\frac{N}{\\log N}\\right)^{1/2}\\log\\log N\\right)$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_441.variants.chen_dai_upper_bound :\n    (fun N : ℕ ↦ (g N : ℝ) - √(9 / 8 * N)) =O[atTop]\n      fun N ↦ √(N / Real.log N) * Real.log (Real.log N) := by\n  sorry\n\nend Erdos441\n",
  "statement_hash": "4e173f25a95cfe3430d692cf8a7beedd35023b366edbafa991e41bc91aa552d0",
  "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."
}