{
  "id": "8555",
  "ident": "NS.08555",
  "slug": "wikipedia-thabitnumber",
  "title": "Thabit numbers and Thabit primes",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "There are infinitely many exponents $n \\in \\mathbb{N}$ ([OEIS A002235](https://oeis.org/A002235))\nfor which the Thabit number $K_n = 3 \\cdot 2^n - 1$ is prime\n([OEIS A007505](https://oeis.org/A007505)); since `thabitNumber` is injective, this is equivalent to\nthe infinitude of Thabit primes themselves.\n\n*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Thabit_number)",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "wikipedia",
  "source_url": "https://en.wikipedia.org/wiki/Thabit_number",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "ThabitNumber.infinitely_many_thabit_primes",
  "statement_lean": "theorem infinitely_many_thabit_primes : {n : ℕ | (thabitNumber n).Prime}.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# Thabit numbers and Thabit primes\n\nFor $n \\ge 0$, the $n$-th *Thabit number* (of the first kind) is $K_n = 3 \\cdot 2^n - 1$. In the\nninth century, Thābit ibn Qurra proved that whenever $n \\ge 2$ makes $p = K_{n-1}$, $q = K_n$, and\n$r = 9 \\cdot 2^{2n - 1} - 1$ simultaneously prime, the integers $2^n p q$ and $2^n r$ form an\namicable pair (`IsAmicable`). Whether infinitely many Thabit primes exist, and whether Thābit ibn\nQurra's rule produces any amicable pair beyond the three known exponents $n = 2, 4, 7$ [Bo72, Gu04],\nremain open.\n\n*References:*\n- [Wikipedia](https://en.wikipedia.org/wiki/Thabit_number)\n- [OEIS A055010](https://oeis.org/A055010)\n- [OEIS A007505](https://oeis.org/A007505)\n- [OEIS A002235](https://oeis.org/A002235)\n- [Bo72] Borho, W. (1972). *On Thabit ibn Kurrah's formula for amicable numbers*, Math. Comp. 26\n  (118), 571--578.\n- [Gu04] Guy, R. K. (2004). *Unsolved Problems in Number Theory*, 3rd ed., Problem B4, Springer,\n  New York. https://doi.org/10.1007/978-0-387-26677-0\n-/\n\n@[expose] public section\n\nnamespace ThabitNumber\n\n/-- The $n$-th **Thabit number** of the first kind, $K_n = 3 \\cdot 2^n - 1$\n([OEIS A055010](https://oeis.org/A055010)). -/\ndef thabitNumber (n : ℕ) : ℕ := 3 * 2 ^ n - 1\n\n/-- The Thabit numbers $K_n$ are prime for $n = 0, 1, 2, 3, 4$ ($2, 5, 11, 23, 47$) and composite at\n$n = 5$ ($K_5 = 95 = 5 \\cdot 19$). -/\n@[category test, AMS 11]\ntheorem thabitNumber_small_values :\n    (thabitNumber 0).Prime ∧ (thabitNumber 1).Prime ∧ (thabitNumber 2).Prime ∧\n      (thabitNumber 3).Prime ∧ (thabitNumber 4).Prime ∧ ¬ (thabitNumber 5).Prime := by\n  decide\n\n/-- At $n = 2$, $p = K_1 = 5$, $q = K_2 = 11$, and $r = 71$ produce the classic amicable pair\n$(220, 284)$. -/\n@[category test, AMS 11]\ntheorem thabit_rule_amicable_220_284 :\n    2 ^ 2 * thabitNumber 1 * thabitNumber 2 = 220 ∧\n      2 ^ 2 * (9 * 2 ^ (2 * 2 - 1) - 1) = 284 ∧\n      IsAmicable 220 284 := by\n  refine ⟨by decide, by decide, ?_⟩\n  rw [isAmicable_iff]\n  decide\n\n/--\n**Thābit ibn Qurra's amicable number theorem** [Bo72]: for $n \\ge 2$, if $K_{n-1}$, $K_n$, and\n$9 \\cdot 2^{2n - 1} - 1$ are all prime, then $2^n K_{n-1} K_n$ and $2^n (9 \\cdot 2^{2n - 1} - 1)$\nform an amicable pair.\n\nThe hypothesis $n \\ge 2$ excludes $n = 1$, where $K_0 = 2$ is not coprime to $2^n$.\n-/\n@[category textbook, AMS 11]\ntheorem thabit_amicable_rule {n : ℕ} (hn : 2 ≤ n) (hp : (thabitNumber (n - 1)).Prime)\n    (hq : (thabitNumber n).Prime) (hr : (9 * 2 ^ (2 * n - 1) - 1).Prime) :\n    IsAmicable (2 ^ n * thabitNumber (n - 1) * thabitNumber n)\n      (2 ^ n * (9 * 2 ^ (2 * n - 1) - 1)) := by\n  sorry\n\n/--\nThere are infinitely many exponents $n \\in \\mathbb{N}$ ([OEIS A002235](https://oeis.org/A002235))\nfor which the Thabit number $K_n = 3 \\cdot 2^n - 1$ is prime\n([OEIS A007505](https://oeis.org/A007505)); since `thabitNumber` is injective, this is equivalent to\nthe infinitude of Thabit primes themselves.\n\n*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Thabit_number)\n-/\n@[category research open, AMS 11]\ntheorem infinitely_many_thabit_primes : {n : ℕ | (thabitNumber n).Prime}.Infinite := by\n  sorry\n\n/--\nDoes there exist an integer $n > 7$ for which $K_{n-1}$, $K_n$, and $9 \\cdot 2^{2n - 1} - 1$ are\nsimultaneously prime, yielding an amicable pair via Thābit ibn Qurra's rule [Bo72, Gu04]? Only\n$n = 2, 4, 7$ are currently known.\n-/\n@[category research open, question, AMS 11]\ntheorem exists_thabit_amicable_exponent_gt_seven :\n    ∃ n > 7, (thabitNumber (n - 1)).Prime ∧ (thabitNumber n).Prime ∧\n      (9 * 2 ^ (2 * n - 1) - 1).Prime := by\n  sorry\n\nend ThabitNumber\n",
  "statement_hash": "1b6db99f29e8f3e0b53a0a215e97d19f47d2eb8970e66a9313c59d1dbab74fc6",
  "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."
}