{
  "id": "1984",
  "ident": "NS.01984",
  "slug": "erdos-394",
  "title": "Erdős Problem 394",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Is it true that $\\sum_{n\\leq x}t_2(n)\\ll \\frac{x^2}{(\\log x)^c}$ for some $c>0$?",
  "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": "Erdos394.erdos_394.parts.i",
  "statement_lean": "theorem erdos_394.parts.i :\n    ∃ c > (0 : ℝ), (fun x ↦ ∑ n ∈ Icc 1 ⌊x⌋₊,\n    (t 2 n : ℝ)) ≪ (fun x ↦ x ^ 2 / (Real.log x) ^ 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-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 394\n\n*References:*\n- [erdosproblems.com/394](https://www.erdosproblems.com/394)\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- [ErHa78] Erdős, P. and Hall, R. R., On some unconventional problems on the divisors of integers.\n  J. Austral. Math. Soc. Ser. A (1978), 479--485.\n-/\n\n@[expose] public section\n\nopen Nat Filter Finset\nopen scoped Asymptotics Topology Nat\n\nnamespace Erdos394\n\n/--\nLet $t_k(n)$ denote the least $m$ such that $n\\mid m(m+1)(m+2)\\cdots (m+k-1).$\n-/\nnoncomputable def t (k n : ℕ) : ℕ :=\n  sInf { m : ℕ | 0 < m ∧ n ∣ ∏ i ∈ range k, (m + i) }\n\n/-- `t k n = v` when `v` works and nothing positive below it does. -/\n@[category API, AMS 11]\ntheorem t_eq_of {n k v : ℕ} (hv : 0 < v)\n    (hdvd : n ∣ ∏ i ∈ range k, (v + i))\n    (hlt : ∀ m ∈ range v, 0 < m → ¬ (n ∣ ∏ i ∈ range k, (m + i))) :\n    t k n = v := by\n  refine le_antisymm (Nat.sInf_le ⟨hv, hdvd⟩) ?_\n  by_contra! hc\n  have hne : { m : ℕ | 0 < m ∧ n ∣ ∏ i ∈ range k, (m + i) }.Nonempty := ⟨v, hv, hdvd⟩\n  obtain ⟨hpos, hd⟩ := Nat.sInf_mem hne\n  exact hlt _ (mem_range.mpr hc) hpos hd\n\n/-- The least positive multiple of `n` is `n`, so `t 1 n = n`. -/\n@[category API, AMS 11]\ntheorem t_one {n : ℕ} (hn : 0 < n) : t 1 n = n := by\n  refine le_antisymm (Nat.sInf_le ⟨hn, by simp⟩) ?_\n  have hne : { m : ℕ | 0 < m ∧ n ∣ ∏ i ∈ range 1, (m + i) }.Nonempty := ⟨n, hn, by simp⟩\n  obtain ⟨hpos, hd⟩ := Nat.sInf_mem hne\n  rw [prod_range_one, add_zero] at hd\n  exact Nat.le_of_dvd hpos hd\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIs it true that $\\sum_{n\\leq x}t_2(n)\\ll \\frac{x^2}{(\\log x)^c}$ for some $c>0$?\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at \"https://github.com/williamjblair/lean-proofs/blob/4f915a323443bfb1709a6805a013812016dca88a/starfleet/erdos-394/Research/FirstQuestion.lean\"]\ntheorem erdos_394.parts.i :\n    ∃ c > (0 : ℝ), (fun x ↦ ∑ n ∈ Icc 1 ⌊x⌋₊,\n    (t 2 n : ℝ)) ≪ (fun x ↦ x ^ 2 / (Real.log x) ^ c) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIs it true that, for $k\\geq 2$, $\\sum_{n\\leq x}t_{k+1}(n) =o\\left(\\sum_{n\\leq x}t_k(n)\\right)?$\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at \"https://github.com/williamjblair/lean-proofs/blob/4f915a323443bfb1709a6805a013812016dca88a/starfleet/erdos-394/Research/DenseHierarchyLittleO.lean\"]\ntheorem erdos_394.parts.ii :\n    ∀ k ≥ 2, (fun (x : ℝ) ↦ ∑ n ∈ Icc 1 ⌊x⌋₊,\n    (t (k + 1) n : ℝ)) =o[atTop]\n    (fun (x : ℝ) ↦ ∑ n ∈ Icc 1 ⌊x⌋₊,\n    (t k n : ℝ)) := by\n  sorry\n\n/--\nIn [ErGr80] they mention a conjecture of Erdős that the sum is $o(x^2)$. This was proved by Erdős\nand Hall [ErHa78], who proved that in fact\n$\\sum_{n\\leq x}t_2(n)\\ll \\frac{\\log\\log\\log x}{\\log\\log x}x^2.$\n-/\n@[category research solved, AMS 11]\ntheorem erdos_394.variants.hall_bound :\n    (fun x ↦ ∑ n ∈ Icc 1 ⌊x⌋₊, (t 2 n : ℝ)) ≪\n    (fun x ↦ x ^ 2 * (Real.log (Real.log (Real.log x)) / Real.log (Real.log x))) := by\n  sorry\n\n/--\nErdős and Hall conjecture that the sum is $o(x^2/(\\log x)^c)$ for any $c<\\log 2$.\n-/\n@[category research open, AMS 11]\ntheorem erdos_394.variants.hall_conjecture :\n    ∀ c < Real.log 2, (fun x ↦ ∑ n ∈ Icc 1 ⌊x⌋₊,\n    (t 2 n : ℝ)) =o[atTop]\n    (fun x ↦ x ^ 2 / (Real.log x) ^ c) := by\n  sorry\n\n/--\nSince $t_2(p)=p-1$ for prime $p$ it is trivial that $\\sum_{n\\leq x}t_2(n)\\gg \\frac{x^2}{\\log x}$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_394.variants.lower_bound :\n    (fun x ↦ x ^ 2 / Real.log x) ≪\n    (fun x ↦ ∑ n ∈ Icc 1 ⌊x⌋₊, (t 2 n : ℝ)) := by\n  sorry\n\n/--\nThey ask about the behaviour of $t_{n-3}(n!)$ and also ask whether, for infinitely many $n$,\n$t_k(n!)< t_{k-1}(n!)-1$ for all $1\\leq k < n$.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_394.variants.factorial_gap_conjecture :\n    Set.Infinite { n : ℕ | ∀ k, 2 ≤ k → k < n →\n    t k (n !) < t (k - 1) (n !) - 1 } := by\n  sorry\n\nset_option maxRecDepth 20000 in\n/--\nThey proved (with Selfridge) that this holds for $n=10$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_394.variants.factorial_gap_10 :\n    ∀ (k : ℕ), 2 ≤ k → k < 10 →\n    t k (10 !) <\n    t (k - 1) (10 !) - 1 := by\n  have h1 : t 1 (10 !) = 3628800 := by rw [t_one] <;> norm_num [Nat.factorial]\n  have h2 : t 2 (10 !) = 512000 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by native_decide) (by native_decide)\n  have h3 : t 3 (10 !) = 6398 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by native_decide) (by native_decide)\n  have h4 : t 4 (10 !) = 5373 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by native_decide) (by native_decide)\n  have h5 : t 5 (10 !) = 348 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by decide) (by decide)\n  have h6 : t 6 (10 !) = 160 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by decide) (by decide)\n  have h7 : t 7 (10 !) = 30 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by decide) (by decide)\n  have h8 : t 8 (10 !) = 9 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by decide) (by decide)\n  have h9 : t 9 (10 !) = 2 := by\n    norm_num [Nat.factorial]; exact t_eq_of (by norm_num) (by decide) (by decide)\n  intro k hk2 hk10\n  interval_cases k <;> simp_all\n\nend Erdos394\n",
  "statement_hash": "1f8af35c8b0266abdf1abb63f2cba90573a8c5181d5cc2129973a9ff1a3c9def",
  "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."
}