{
  "id": "1568",
  "ident": "NS.01568",
  "slug": "erdos-291",
  "title": "Erdős Problem 291",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $n\\geq 1$ and define $L_n$ to be the least common multiple of $\\{1,\\ldots,n\\}$ and $a_n$ by\n$\\sum_{1\\leq k\\leq n}\\frac{1}{k}=\\frac{a_n}{L_n}$.\n\nIs it true that $(a_n,L_n)=1$ occurs for infinitely many $n$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos291.erdos_291.parts.i",
  "statement_lean": "theorem erdos_291.parts.i :\n    { n : ℕ | Nat.gcd (a n) (L n) = 1 }.Infinite",
  "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 291\n\n*References:*\n- [erdosproblems.com/291](https://www.erdosproblems.com/291)\n- [ErGr80, p.34] Erdős, P. and Graham, R., Old and new problems and results in combinatorial number\n  theory. Monographies de L'Enseignement Mathematique (1980).\n- [Sh16] P. Shiu, The denominators of harmonic numbers. arXiv:1607.02863 (2016).\n- [WuYa22] Wu, Bing-Ling and Yan, Xiao-Hui, On the denominators of harmonic numbers. {IV}. C. R.\n  Math. Acad. Sci. Paris (2022), 53--57.\n-/\n\n@[expose] public section\n\nopen Nat Finset Set Filter\n\nnamespace Erdos291\n\n/--\n$L_n$ is the least common multiple of $\\{1,\\ldots,n\\}$.\n-/\ndef L (n : ℕ) : ℕ :=\n  (Finset.Icc 1 n).lcm (fun x ↦ x)\n\n@[category test, AMS 11]\ntheorem L_eval : L 1 = 1 ∧ L 2 = 2 ∧ L 3 = 6 ∧ L 4 = 12 := by decide\n\n/--\n$a_n$ is defined by $\\sum_{1\\leq k\\leq n}\\frac{1}{k}=\\frac{a_n}{L_n}$.\n-/\ndef a (n : ℕ) : ℕ :=\n  ∑ k ∈ Finset.Icc 1 n, L n / k\n\n@[category test, AMS 11]\ntheorem a_eval : a 1 = 1 ∧ a 2 = 3 ∧ a 3 = 11 ∧ a 4 = 25 := by decide\n\n/--\nLet $n\\geq 1$ and define $L_n$ to be the least common multiple of $\\{1,\\ldots,n\\}$ and $a_n$ by\n$\\sum_{1\\leq k\\leq n}\\frac{1}{k}=\\frac{a_n}{L_n}$.\n\nIs it true that $(a_n,L_n)=1$ occurs for infinitely many $n$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_291.parts.i :\n    { n : ℕ | Nat.gcd (a n) (L n) = 1 }.Infinite := by\n  sorry\n\n/--\nIs it true that $(a_n,L_n)>1$ occurs for infinitely many $n$?\n\nSteinerberger has observed that the answer to the second question is trivially yes: for example, any\n$n$ which begins with a $2$ in base $3$ has $3\\mid (a_n,L_n)$.\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_291.parts.ii :\n    { n : ℕ | Nat.gcd (a n) (L n) > 1 }.Infinite := by\n  sorry\n\n/--\nMore generally, if the leading digit of $n$ in base $p$ is $p-1$ then $p\\mid (a_n,L_n)$. There is\nin fact a necessary and sufficient condition: a prime $p\\leq n$ divides $(a_n,L_n)$ if and only if\n$p$ divides the numerator of $1+\\cdots+\\frac{1}{k}$, where $k$ is the leading digit of $n$ in base\n$p$. This can be seen by writing $a_n = \\frac{L_n}{1}+\\cdots+\\frac{L_n}{n}$ and observing that the\nright-hand side is congruent to $1+\\cdots+1/k$ modulo $p$. (The previous claim about $p-1$ follows\nimmediately from Wolstenholme's theorem.)\n-/\n@[category research solved, AMS 11]\ntheorem erdos_291.variants.steinerberger_generalization (n p : ℕ) (hp : p.Prime) (hpn : p ≤ n) :\n    let k := n / p ^ Nat.log p n;\n    p ∣ Nat.gcd (a n) (L n) ↔ (p : ℤ) ∣ (∑ i ∈ Finset.Icc 1 k, (1 : ℚ) / i).num := by\n  sorry\n\n/--\nThis leads to a heuristic prediction (see for example a preprint of Shiu [Sh16]) of\n$\\asymp\\frac{x}{\\log x}$ for the number of $n\\in [1,x]$ such that $(a_n,L_n)=1$.\n-/\n@[category research open, AMS 11]\ntheorem erdos_291.variants.shiu_heuristic_asymptotic :\n    Asymptotics.IsTheta atTop\n      (fun x : ℕ ↦ ((((Finset.Icc 1 x).filter (fun n ↦ Nat.gcd (a n) (L n) = 1)).card : ℝ)))\n      (fun x : ℕ ↦ (x : ℝ) / Real.log x) := by\n  sorry\n\n/--\nIn particular, there should be infinitely many $n$, but the set of such $n$ should have\ndensity zero. Unfortunately this heuristic is difficult to turn into a proof.\n-/\n@[category research open, AMS 11]\ntheorem erdos_291.variants.shiu_heuristic_density_zero :\n    Filter.Tendsto (fun N : ℕ ↦\n      ((((Finset.Icc 1 N).filter (fun n ↦ Nat.gcd (a n) (L n) = 1)).card : ℝ) / (N : ℝ)))\n      atTop (nhds 0) := by\n  sorry\n\n/--\nWu and Yan [WuYa22] have proved, conditional on $\\frac{1}{\\log p}$ being linearly independent\nover $\\mathbb{Q}$ for any finite collection of primes $p$ (itself a consequence of Schanuel's\nconjecture), that the set of $n$ for which $(a_n,L_n)>1$ has upper density $1$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_291.variants.wu_yan\n    (h_indep : LinearIndependent ℚ (fun p : {p : ℕ // p.Prime} ↦ 1 / Real.log (p : ℝ))) :\n    atTop.limsup (fun N : ℕ ↦\n      ((((Finset.Icc 1 N).filter (fun n ↦ Nat.gcd (a n) (L n) > 1)).card : ℝ) /\n        (N : ℝ) : EReal)) = 1 := by\n  sorry\n\nend Erdos291\n",
  "statement_hash": "8b61744df9497efab92c2f500edac0d397897ff6941813f3162b36168d4a1436",
  "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."
}