{
  "id": "8012",
  "ident": "NS.08012",
  "slug": "wikipedia-idonealcompleteness",
  "title": "Idoneal numbers completeness conjecture",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Idoneal numbers completeness conjecture.\n\nThis follows from the Generalized Riemann Hypothesis for Dirichlet $L$-functions, which is proved\n[Al26]. Under this hypothesis, Weinberger [We73, Theorem 1] proved that the class group of\n$\\mathbb{Q}(\\sqrt{-d})$ does not have exponent $2$ if its discriminant $-d$ satisfies $d > 5460$.\nCompleteness of the list is deduced from this in [Ka11, Corollary 23]. Weinberger's proof uses a\ncomputation of Lehmer, without details, for $d < 200560490130$. The unconditional tabulation for\n$d < 2^{40}$ in [MJ15] covers this range.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Idoneal.idoneal_numbers_completeness",
  "statement_lean": "theorem idoneal_numbers_completeness :\n    ∀ n : ℕ, IsIdoneal n → n ∈ knownIdonealNumbers",
  "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# Idoneal numbers completeness conjecture\n\nAn integer $D>0$ is **idoneal** if every\ninteger that can be expressed in exactly one way (up to order and signs)\nas $x^2 + D y^2$ with gcd(x, Dy)=1 is a prime power or twice a prime power.\n\nThe Idoneal Numbers Completeness Conjecture asserts that the following list of\n65 numbers is complete:\n1,2,3,4,5,6,7,8,9,10,12,13,15,16,18,21,22,24,25,28,30,33,37,40,42,45,48,\n57,58,60,70,72,78,85,88,93,102,105,112,120,130,133,165,168,177,190,210,232,\n240,253,273,280,312,330,345,357,385,408,462,520,760,840,1320,1365,1848.\n*References:*\n- [Wikipedia: Idoneal number](https://en.wikipedia.org/wiki/Idoneal_number)\n- [OEIS A000926](https://oeis.org/A000926)\n-/\n\n@[expose] public section\n\nnamespace Idoneal\n\n/--\nEquivalent definition: A positive integer $n$ is idoneal if and only if it cannot be written as\n$ab + bc + ac$ for distinct positive integers $a, b,$ and $c$.\n-/\ndef IsIdoneal (n : ℕ) : Prop :=\n  0 < n ∧\n    ¬ ∃ a b c : ℕ,\n      0 < a ∧ a < b ∧ b < c ∧ n = a * b + b * c + a * c\n\n/--\nThe 65 known idoneal numbers that are conjectured to be the only idoneal numbers.\n-/\ndef knownIdonealNumbers : Finset ℕ :=\n  {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 18, 21, 22, 24, 25, 28,\n   30, 33, 37, 40, 42, 45, 48, 57, 58, 60, 70, 72, 78, 85, 88, 93, 102, 105,\n   112, 120, 130, 133, 165, 168, 177, 190, 210, 232, 240, 253, 273, 280, 312,\n   330, 345, 357, 385, 408, 462, 520, 760, 840, 1320, 1365, 1848}\n\n/--\nReduces the unbounded search for a representation `n = a*b + b*c + a*c` (with\n`0 < a < b < c`) to a *bounded, decidable* double search over `a, b ∈ range (n+1)`.\n\nThe third variable is not searched: for a fixed pair `a, b` the equation\n`n = a*b + c*(a+b)` pins down `c = (n - a*b) / (a+b)`, so the witness `c` is\nrecovered by exact division. The forward direction uses `a, b ≤ n` (each pairwise\nproduct is at most `n`) to land the pair in `range (n+1)`.\n-/\n@[category API, AMS 11]\nprivate theorem exists_triple_iff_bounded (n : ℕ) :\n    (∃ a b c : ℕ, 0 < a ∧ a < b ∧ b < c ∧ n = a * b + b * c + a * c) ↔\n      (∃ a ∈ Finset.range (n + 1), ∃ b ∈ Finset.range (n + 1),\n        0 < a ∧ a < b ∧ b < (n - a * b) / (a + b) ∧\n          n = a * b + b * ((n - a * b) / (a + b)) + a * ((n - a * b) / (a + b))) := by\n  constructor\n  · rintro ⟨a, b, c, ha, hab, hbc, heq⟩\n    have hbn : b ≤ n := by nlinarith\n    have han : a ≤ n := by nlinarith\n    have hsum : n - a * b = c * (a + b) := by\n      have : n = a * b + c * (a + b) := by ring_nf; ring_nf at heq; linarith\n      omega\n    have hpos : 0 < a + b := by omega\n    have hc : (n - a * b) / (a + b) = c := by rw [hsum]; exact Nat.mul_div_cancel _ hpos\n    exact ⟨a, Finset.mem_range.mpr (by omega), b, Finset.mem_range.mpr (by omega),\n      ha, hab, hc ▸ hbc, hc ▸ heq⟩\n  · rintro ⟨a, _, b, _, ha, hab, hbc, heq⟩\n    exact ⟨a, b, (n - a * b) / (a + b), ha, hab, hbc, heq⟩\n\nset_option maxRecDepth 4096 in\n/-- All 65 known idoneal numbers are indeed idoneal. -/\n@[category test, AMS 11]\ntheorem knownIdonealNumbers_are_idoneal : ∀ n ∈ knownIdonealNumbers, IsIdoneal n := by\n  intro n hn\n  fin_cases hn <;>\n    refine ⟨by norm_num, ?_⟩ <;>\n    rw [exists_triple_iff_bounded] <;>\n    native_decide\n\n/--\nIdoneal numbers completeness conjecture.\n-/\n@[category research open, question, AMS 11]\ntheorem idoneal_numbers_completeness :\n    ∀ n : ℕ, IsIdoneal n → n ∈ knownIdonealNumbers := by\n  sorry\n\nend Idoneal\n",
  "statement_hash": "3b809ab78dff492d46c38aa8f746c656942bb9528ec1625d497b0369ff524a69",
  "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."
}