{
  "id": "4710",
  "ident": "NS.04710",
  "slug": "oeis-111291",
  "title": "Number of refactorable numbers (A033950) $\\le 10^n$",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Simon Colton conjectures that the number of refactorable numbers less than $x$ is at least\n$\\frac{x}{2\\log x}$. This is an asymptotic claim, so we state it for sufficiently large $x$.\n\nIn this form it is a theorem: Zelinsky [Ze02, Theorem 7] proved that for every $k$ the number of\nrefactorable numbers $\\le n$ exceeds $k \\pi(n)$ for all sufficiently large $n$, and\n$\\pi(n) \\sim n / \\log n$. It also follows from Spiro's asymptotic [Sp85], by which the count is\n$\\frac{x}{\\sqrt{\\log x}} (\\log \\log x)^{-1 + o(1)}$. See `colton_conjecture` for the\npointwise conjecture that remains open.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA111291.conjecture",
  "statement_lean": "theorem conjecture : ∀ᶠ x in Filter.atTop,\n    (countRefactorable x : ℝ) ≥ x / (2 * Real.log x)",
  "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\nmeta import FormalConjecturesForMathlib.NumberTheory.Refactorable\nmeta import Mathlib.NumberTheory.PrimeCounting\n\n/-!\n# Number of refactorable numbers (A033950) $\\le 10^n$\n\nA number $k$ is refactorable if its number of divisors, $\\tau(k)$, divides $k$.\n\n*References:*\n- [A111291](https://oeis.org/A111291)\n- [Co99] Colton, S., *Refactorable numbers - a machine invention*. J. Integer Seq. 2 (1999),\n  Article 99.1.2.\n- [Ze02] Zelinsky, J., *Tau numbers: a partial proof of a conjecture and other results*.\n  J. Integer Seq. 5 (2002), Article 02.2.8.\n- [Sp85] Spiro, C., *How often is the number of divisors of n a divisor of n?*\n  J. Number Theory 21 (1985), 81--100.\n-/\n\n@[expose] public section\n\nnamespace OeisA111291\n\nopen Nat Finset Real\n\n/-- Helper function: number of refactorable numbers $\\le m$. -/\ndef countRefactorableNat (m : ℕ) : ℕ :=\n  (Icc 1 m).filter IsRefactorable |>.card\n\n/--\n`a n` is the number of refactorable numbers $\\le 10^n$.\nA number $k$ is refactorable if its number of divisors, $\\tau(k)$, divides $k$.\n-/\ndef a (n : ℕ) : ℕ :=\n  countRefactorableNat (10 ^ n)\n\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by rfl\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 4 := by rfl\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 16 := by rfl\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 92 := by native_decide\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 665 := by native_decide\n\n/--\n`countRefactorable x` is the number of refactorable numbers $\\le x$.\n-/\nnoncomputable def countRefactorable (x : ℝ) : ℕ :=\n  if _hx : x ≥ 1 then\n    countRefactorableNat (Int.toNat (floor x))\n  else\n    0\n\n/--\nSimon Colton conjectures that the number of refactorable numbers less than $x$ is at least\n$\\frac{x}{2\\log x}$. This is an asymptotic claim, so we state it for sufficiently large $x$.\n\nIn this form it is a theorem: Zelinsky [Ze02, Theorem 7] proved that for every $k$ the number of\nrefactorable numbers $\\le n$ exceeds $k \\pi(n)$ for all sufficiently large $n$, and\n$\\pi(n) \\sim n / \\log n$. It also follows from Spiro's asymptotic [Sp85], by which the count is\n$\\frac{x}{\\sqrt{\\log x}} (\\log \\log x)^{-1 + o(1)}$. See `colton_conjecture` for the\npointwise conjecture that remains open.\n-/\n@[category research solved, AMS 11]\ntheorem conjecture : ∀ᶠ x in Filter.atTop,\n    (countRefactorable x : ℝ) ≥ x / (2 * Real.log x) := by\n  sorry\n\n/--\nColton's conjecture [Co99] as stated by Zelinsky [Ze02]: for every $n$, the number of\nrefactorable numbers $\\le n$ is at least half the number of primes $\\le n$, i.e.\n$\\pi(n) \\le 2\\,T(n)$.\n\nZelinsky [Ze02] proved this for all sufficiently large $n$ (see `conjecture`), with an explicit\nbound of $7.42 \\cdot 10^{13}$ beyond which it holds; the remaining range is open.\n-/\n@[category research open, AMS 11]\ntheorem colton_conjecture : ∀ n : ℕ, Nat.primeCounting n ≤ 2 * countRefactorableNat n := by\n  sorry\n\n/-- Colton's conjecture holds for $n \\le 500$. -/\n@[category test, AMS 11]\ntheorem colton_conjecture_le_500 : ∀ n ≤ 500, Nat.primeCounting n ≤ 2 * countRefactorableNat n := by\n  native_decide\n\nend OeisA111291\n",
  "statement_hash": "088e46a1cce6ab4c2f83864a904ed05beae6b3ac4800a437e2b4b512dd8fdd18",
  "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."
}