{
  "id": "1902",
  "ident": "NS.01902",
  "slug": "erdos-365",
  "title": "Erdős Problem 365",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Do all pairs of consecutive powerful numbers $n$ and $n+1$ come from solutions to Pell\nequations? In other words, must either $n$ or $n+1$ be a square?\n\nThe answer to the first question is no: Golomb [Go70] observed that both $12167=23^3$ and\n$12168=2^3 3^2 13^2$ are powerful.\n\nWe require $n>0$ since `Nat.Powerful` also includes $0$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos365.erdos_365.parts.i",
  "statement_lean": "theorem erdos_365.parts.i :\n    ¬ ∀ n : ℕ, 0 < n → Nat.Powerful n → Nat.Powerful (n + 1) →\n      IsSquare n ∨ IsSquare (n + 1)",
  "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 365\n\n*References:*\n- [erdosproblems.com/365](https://www.erdosproblems.com/365)\n- [Go70] Golomb, S. W., *Powerful numbers*. Amer. Math. Monthly (1970), 848-855.\n- [Gu04] Guy, R. K., *Unsolved problems in number theory* (2004), Problem B16.\n- [Wa76] Walker, D. T., *Consecutive integer pairs of powerful numbers and related\n  Diophantine equations*. Fibonacci Quart. (1976), 111-116.\n-/\n\n@[expose] public section\n\nnamespace Erdos365\n\n/-- Golomb's consecutive powerful pair $12167=23^3$ and $12168=2^3 3^2 13^2$.\nNeither number is a square [Go70]. -/\n@[category test, AMS 11]\ntheorem golomb_pair :\n    Nat.Powerful 12167 ∧ Nat.Powerful 12168 ∧\n      ¬ IsSquare (12167 : ℕ) ∧ ¬ IsSquare (12168 : ℕ) := by\n  have hA : Nat.Powerful 12167 := by\n    intro p hp\n    obtain ⟨hp, hd, _⟩ := Nat.mem_primeFactors.mp hp\n    have hpow : p ∣ (23 : ℕ) ^ 3 := by norm_num at hd ⊢; exact hd\n    have heq : p = 23 := Nat.prime_eq_prime_of_dvd_pow hp (by norm_num) hpow\n    subst p\n    norm_num\n  have hB : Nat.Powerful 12168 := by\n    intro p hp\n    obtain ⟨hp, hd, _⟩ := Nat.mem_primeFactors.mp hp\n    have hprod : p ∣ (2 : ℕ) ^ 3 * 3 ^ 2 * 13 ^ 2 := by norm_num at hd ⊢; exact hd\n    rcases hp.dvd_mul.mp hprod with hab | hc\n    · rcases hp.dvd_mul.mp hab with ha | hb\n      · have heq : p = 2 := Nat.prime_eq_prime_of_dvd_pow hp (by norm_num) ha\n        subst p\n        norm_num\n      · have heq : p = 3 := Nat.prime_eq_prime_of_dvd_pow hp (by norm_num) hb\n        subst p\n        norm_num\n    · have heq : p = 13 := Nat.prime_eq_prime_of_dvd_pow hp (by norm_num) hc\n      subst p\n      norm_num\n  have hns : ∀ n : ℕ, 12100 < n → n < 12321 → ¬ IsSquare n := by\n    intro n hlo hhi ⟨r, hr⟩\n    have hrlo : 110 < r := by nlinarith\n    have hrhi : r < 111 := by nlinarith\n    omega\n  exact ⟨hA, hB, hns _ (by norm_num) (by norm_num), hns _ (by norm_num) (by norm_num)⟩\n\n/--\nDo all pairs of consecutive powerful numbers $n$ and $n+1$ come from solutions to Pell\nequations? In other words, must either $n$ or $n+1$ be a square?\n\nThe answer to the first question is no: Golomb [Go70] observed that both $12167=23^3$ and\n$12168=2^3 3^2 13^2$ are powerful.\n\nWe require $n>0$ since `Nat.Powerful` also includes $0$.\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_365.parts.i :\n    ¬ ∀ n : ℕ, 0 < n → Nat.Powerful n → Nat.Powerful (n + 1) →\n      IsSquare n ∨ IsSquare (n + 1) := by\n  intro h\n  obtain ⟨hA, hB, hnA, hnB⟩ := golomb_pair\n  rcases h 12167 (by norm_num) hA hB with hs | hs\n  · exact hnA hs\n  · exact hnB hs\n\n/-- Is the number of positive $n\\leq x$ such that $n$ and $n+1$ are both powerful bounded\nby $(\\log x)^{O(1)}$? -/\n@[category research open, question, AMS 11]\ntheorem erdos_365.parts.ii :\n    ∃ C : ℝ, 0 < C ∧ ∃ k : ℕ, ∀ᶠ x : ℕ in Filter.atTop,\n      ({n : ℕ | 0 < n ∧ n ≤ x ∧ Nat.Powerful n ∧ Nat.Powerful (n + 1)}.ncard : ℝ) ≤\n        C * (Real.log x) ^ k := by\n  sorry\n\nend Erdos365\n",
  "statement_hash": "1517c6455927b84159b07f4aa81a299bb4422923fec4da551b122237062e082a",
  "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."
}