{
  "id": "3724",
  "ident": "NS.03724",
  "slug": "erdos-946",
  "title": "Erdős Problem 946",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "There are infinitely many $n$ such that $τ(n) = τ(n+1)$. Proved in [He84].\nHere τ is the divisor counting function, which is `σ 0` in mathlib.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos946.erdos_946",
  "statement_lean": "theorem erdos_946 : {n : ℕ | σ 0 n = σ 0 (n + 1)}.Infinite",
  "challenge_source": "/-\nCopyright 2025 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/-!\n# Erdős Problem 946\n\n*References:*\n - [erdosproblems.com/946](https://www.erdosproblems.com/946)\n - [ErMi52] Erdős, P. and Mirsky, L., The distribution of values of the divisor function {$d(n)$}.\n   Proc. London Math. Soc. (3) (1952), 257--271.\n - [Sp81] Spiro, C. A., The frequency with which an integral-valued, prime-independent,\n   multiplicative or additive function of n divides a polynomial function of n.\n - [He84] Heath-Brown, D. R., The divisor function at consecutive integers.\n   Mathematika 31 (1984), no. 2, 141--149.\n - [Hi85] Hildebrand, A., The divisor function at consecutive integers. Pacific J. Math.\n   (1987), 307--319\n - [EPS87] Erdős, P., Pomerance, C., and Sarkőzy, A., On locally repeated values of\n   arithmetic functions. III. Proc. Amer. Math. Soc. (1987), 1--7.\n-/\n\n@[expose] public section\n\nopen Filter Real\nopen scoped ArithmeticFunction.sigma\n\nnamespace Erdos946\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThere are infinitely many $n$ such that $τ(n) = τ(n+1)$. Proved in [He84].\nHere τ is the divisor counting function, which is `σ 0` in mathlib.\n-/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos946.lean#L75\"]\ntheorem erdos_946 : {n : ℕ | σ 0 n = σ 0 (n + 1)}.Infinite := by\n  sorry\n\n/--\nThere are infinitely many $n$ such that $τ(n) = τ(n + 5040)$. Proved in [Sp81].\n-/\n@[category research solved, AMS 11]\ntheorem erdos_946.variants.spiro_5040 : {n : ℕ | σ 0 n = σ 0 (n + 5040)}.Infinite := by\n  sorry\n\n/-- Number of $n \\le x$ with $τ(n) = τ(n+1)$. -/\nnoncomputable def erdos946Count (x : ℝ) : ℝ :=\n  ((Finset.range (⌊x⌋₊ + 1)).filter (fun n => σ 0 n = σ 0 (n + 1))).card\n\n/--\nThe number of $n \\le x$ with $τ(n) = τ(n+1)$ is at least $x / (\\log x)^7$ for all sufficiently\nlarge $x$. Proved in [He84].\n-/\n@[category research solved, AMS 11]\ntheorem erdos_946.variants.heathbrown_lower_bound :\n    (fun x => x / (x.log)^7) =O[atTop] erdos946Count := by\n  sorry\n\n/--\nImproved lower bound in [Hi85]: $Ω(x / (\\log \\log x)^3)$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_946.variants.hildebrand_lower_bound :\n    (fun x => x / (x.log.log)^3) =O[atTop] erdos946Count := by\n  sorry\n\n/--\nUpper bound in [EPS87]: $O(x / \\sqrt{\\log \\log x})$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_946.variants.upper_bound : erdos946Count =O[atTop] (fun x => x / √x.log.log ) := by\n  sorry\n\nend Erdos946\n",
  "statement_hash": "092184b39e680cebc17845d6a74c4fe9fc10cf8c9b2dc2ac340cf67519f8092d",
  "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."
}