{
  "id": "339",
  "ident": "NS.00339",
  "slug": "erdos-1000",
  "title": "Erdős Problem 1000",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $A=\\{n_1<n_2<\\cdots\\}$ be an infinite sequence of positive integers, and let $\\phi_A(k)$\ncount the number of $1\\leq m\\leq n_k$ such that the fraction $\\frac{m}{n_k}$ cannot be written\nas $\\frac{b}{n_j}$ for any integer $b$ and any $j<k$; equivalently,\n$$\n\\frac{n_k}{(m,n_k)}\\nmid n_j\n$$\nfor all $1\\leq j<k$.\n\nIs there a sequence $A$ such that\n$$\n\\lim_{N\\to \\infty}\\frac{1}{N}\\sum_{k\\leq N}\\frac{\\phi_A(k)}{n_k}=0?\n$$\n\nThis was solved by Haight [Ha] who proved that such a sequence does exist (contrary to Erdős'\nexpectations).",
  "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": "Erdos1000.erdos_1000",
  "statement_lean": "theorem erdos_1000 :\n    ∃ n : ℕ → ℕ, StrictMono n ∧ 0 < n 0 ∧\n      Tendsto (phiAvg n) atTop (𝓝 0)",
  "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 1000\n\n*References:*\n- [erdosproblems.com/1000](https://www.erdosproblems.com/1000)\n- [Ca50b] Cassels, J. W. S., *Some metrical theorems in Diophantine approximation. I*. Proc.\n  Cambridge Philos. Soc. (1950), 209-218.\n- [Er64b] Erdős, P., *Problems and results on diophantine approximations*. Compositio Math. (1964),\n  52-65.\n- [Ha] Haight, J. A., *Metric Diophantine approximation and related topics*. PhD thesis.\n-/\n\n@[expose] public section\n\nopen Filter Topology\n\nnamespace Erdos1000\n\n/--\nGiven an infinite sequence of positive integers $A = \\{n_1 < n_2 < \\cdots\\}$, `phiSeq n k` is\n$\\phi_A(k)$: the number of $1\\leq m\\leq n_k$ such that $\\frac{m}{n_k}$ cannot be written as\n$\\frac{b}{n_j}$ for any integer $b$ and any $1\\leq j<k$; equivalently,\n$$\n\\frac{n_k}{(m,n_k)}\\nmid n_j\n$$\nfor all $1\\leq j<k$.\n-/\ndef phiSeq (n : ℕ → ℕ) (k : ℕ) : ℕ :=\n  ((Finset.Icc 1 (n k)).filter fun m => ∀ j < k, ¬ (n k / Nat.gcd m (n k)) ∣ n j).card\n\n/--\nThe average $\\frac{1}{N}\\sum_{k\\leq N}\\frac{\\phi_A(k)}{n_k}$.\n-/\nnoncomputable def phiAvg (n : ℕ → ℕ) (N : ℕ) : ℝ :=\n  (∑ k ∈ Finset.range N, (phiSeq n k : ℝ) / (n k : ℝ)) / (N : ℝ)\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $A=\\{n_1<n_2<\\cdots\\}$ be an infinite sequence of positive integers, and let $\\phi_A(k)$\ncount the number of $1\\leq m\\leq n_k$ such that the fraction $\\frac{m}{n_k}$ cannot be written\nas $\\frac{b}{n_j}$ for any integer $b$ and any $j<k$; equivalently,\n$$\n\\frac{n_k}{(m,n_k)}\\nmid n_j\n$$\nfor all $1\\leq j<k$.\n\nIs there a sequence $A$ such that\n$$\n\\lim_{N\\to \\infty}\\frac{1}{N}\\sum_{k\\leq N}\\frac{\\phi_A(k)}{n_k}=0?\n$$\n\nThis was solved by Haight [Ha] who proved that such a sequence does exist (contrary to Erdős'\nexpectations).\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at \"https://github.com/plby/lean-proofs/blob/main/src/v4.29.1/ErdosProblems/Erdos1000.lean\"]\ntheorem erdos_1000 :\n    ∃ n : ℕ → ℕ, StrictMono n ∧ 0 < n 0 ∧\n      Tendsto (phiAvg n) atTop (𝓝 0) := by\n  sorry\n\n/--\nIt is trivial that $\\phi_A(k)\\geq \\phi(n_k)$, where $\\phi$ is the Euler totient function.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_1000.variants.totient_le (n : ℕ → ℕ) (hn : StrictMono n) (hn0 : 0 < n 0)\n    (k : ℕ) :\n    (n k).totient ≤ phiSeq n k := by\n  rw [Nat.totient, phiSeq]\n  apply Finset.card_le_card_of_injOn (fun a => if a = 0 then n k else a)\n  · intro a ha\n    simp only [Finset.mem_coe, Finset.mem_filter, Finset.mem_range] at ha ⊢\n    obtain ⟨ha1, ha2⟩ := ha\n    have hgcd : Nat.gcd (if a = 0 then n k else a) (n k) = 1 := by\n      by_cases h : a = 0\n      · subst h\n        have : n k = 1 := by simpa [Nat.coprime_zero_right] using ha2\n        simp [this]\n      · simp only [h, if_false]\n        rw [Nat.gcd_comm]; exact ha2\n    have hpos : 0 < n k := lt_of_le_of_lt (Nat.zero_le a) ha1\n    have hmem : 1 ≤ (if a = 0 then n k else a) ∧ (if a = 0 then n k else a) ≤ n k := by\n      by_cases h : a = 0\n      · subst h\n        rw [if_pos rfl]\n        omega\n      · rw [if_neg h]\n        omega\n    simp only [Finset.mem_Icc]\n    refine ⟨hmem, ?_⟩\n    intro j hj\n    rw [hgcd, Nat.div_one]\n    exact Nat.not_dvd_of_pos_of_lt (hn0.trans_le (hn.monotone (Nat.zero_le j))) (hn hj)\n  · intro a ha b hb hab\n    simp only [Finset.mem_coe, Finset.mem_filter, Finset.mem_range] at ha hb\n    simp only at hab\n    by_cases h1 : a = 0 <;> by_cases h2 : b = 0\n    · simp [h1, h2]\n    · have : n k = 1 := by simpa [h1, Nat.coprime_zero_right] using ha.2\n      omega\n    · have : n k = 1 := by simpa [h2, Nat.coprime_zero_right] using hb.2\n      omega\n    · simpa [h1, h2] using hab\n\n/--\nThe study of $\\phi_A$ was introduced by Cassels [Ca50b], who proved that there exist sequences\nsuch that\n$$\n\\liminf_{N\\to \\infty}\\frac{1}{N}\\sum_{k\\leq N}\\frac{\\phi_A(k)}{n_k}=0.\n$$\n-/\n@[category research solved, AMS 11]\ntheorem erdos_1000.variants.liminf_eq_zero :\n    ∃ n : ℕ → ℕ, StrictMono n ∧ 0 < n 0 ∧\n      atTop.liminf (phiAvg n) = 0 := by\n  sorry\n\n/--\nErdős [Er64b] proved that the limit of $\\frac{\\phi_A(k)}{n_k}$ as $k\\to \\infty$ cannot be $0$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_1000.variants.not_tendsto_zero (n : ℕ → ℕ) (hn : StrictMono n) (hn0 : 0 < n 0) :\n    ¬ Tendsto (fun k : ℕ => (phiSeq n k : ℝ) / (n k : ℝ)) atTop (𝓝 0) := by\n  sorry\n\n/--\nIn fact he proved that if $\\liminf \\frac{\\phi_A(k)}{n_k}=0$ then\n$\\limsup \\frac{\\phi_A(k)}{n_k}=1$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_1000.variants.limsup_eq_one (n : ℕ → ℕ) (hn : StrictMono n) (hn0 : 0 < n 0)\n    (h : atTop.liminf (fun k : ℕ => (phiSeq n k : ℝ) / (n k : ℝ)) = 0) :\n    atTop.limsup (fun k : ℕ => (phiSeq n k : ℝ) / (n k : ℝ)) = 1 := by\n  sorry\n\nend Erdos1000\n",
  "statement_hash": "399a2fcc438918991e45d3f8f20a2a2a7ea228c3b4db2460c58ad584a6cdf7e0",
  "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."
}