{
  "id": "5476",
  "ident": "NS.05476",
  "slug": "oeis-228425",
  "title": "Partitions of $n$ into $x + y$ with $x(x+1)/2 + y^2$ prime",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Conjecture: $a(n) > 0$ for all $n > 1$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA228425.conjecture_1",
  "statement_lean": "theorem conjecture_1 (n : ℕ) (hn : n > 1) : a n > 0",
  "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# Partitions of $n$ into $x + y$ with $x(x+1)/2 + y^2$ prime\n\nNumber of ways to write $n = x + y$ ($x, y > 0$) with $x(x+1)/2 + y^2$ prime.\n\n*References:*\n- [A228425](https://oeis.org/A228425)\n-/\n\n@[expose] public section\n\nnamespace OeisA228425\n\n/-- Number of ways to write $n = x + y$ ($x, y > 0$) with $x(x+1)/2 + y^2$ prime. -/\ndef a (n : ℕ) : ℕ :=\n  (Finset.Ico 1 n).filter (fun x : ℕ =>\n    let y := n - x\n    Nat.Prime (x * (x + 1) / 2 + y ^ 2)\n  ) |>.card\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 0 := by decide\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 1 := by decide\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 1 := by decide\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 2 := by decide\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 2 := by decide\n\n/--\nConjecture: $a(n) > 0$ for all $n > 1$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_1 (n : ℕ) (hn : n > 1) : a n > 0 := by\n  sorry\n\n/--\nWe also conjecture that any integer $n > 1$ can be written as $x + y$ ($x, y > 0$) with\n$p_k(x) + p_{k+1}(y)$ prime, if and only if $k$ is among $3, 39, 99$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_2 (k : ℕ) (hk : 3 ≤ k) :\n    (∀ n : ℕ, 1 < n → ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧\n      Nat.Prime (Nat.polygonalNumber k x + Nat.polygonalNumber (k + 1) y)) ↔\n    k = 3 ∨ k = 39 ∨ k = 99 := by\n  sorry\n\n/--\nThe pair $(k, m)$ works if $k$ is among $3, 4, 6$, and $m > k$ is not congruent to $k$ modulo $2$,\nin the sense that all sufficiently large integers $n$ can be written as $x + y$ ($x, y > 0$) with\n$p_k(x) + p_m(y)$ prime.\n- _Zhi-Wei Sun_\n-/\n@[category research open, AMS 11]\ntheorem conjecture_3 (k m : ℕ) (hk : k = 3 ∨ k = 4 ∨ k = 6) (hm : k < m)\n    (hmod : ¬ m ≡ k [MOD 2]) :\n    ∀ᶠ (n : ℕ) in Filter.atTop, ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧\n      Nat.Prime (Nat.polygonalNumber k x + Nat.polygonalNumber m y) := by\n  sorry\n\n/--\nFor $k = 5$, the pair $(5, m)$ works (with $m > 5$) if $m$ is congruent to $0$ or $4$ modulo $6$,\nin the sense that all sufficiently large integers $n$ can be written as $x + y$ ($x, y > 0$) with\n$p_5(x) + p_m(y)$ prime.\n- _Zhi-Wei Sun_\n-/\n@[category research open, AMS 11]\ntheorem conjecture_4 (m : ℕ) (hm : 5 < m) (hmod : m ≡ 0 [MOD 6] ∨ m ≡ 4 [MOD 6]) :\n    ∀ᶠ (n : ℕ) in Filter.atTop, ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧\n      Nat.Prime (Nat.polygonalNumber 5 x + Nat.polygonalNumber m y) := by\n  sorry\n\n/-- The set of pairs $(k, m)$ with $2 < k \\le 10$ and $k < m \\le 100$ conjectured by Zhi-Wei Sun\nto satisfy the property that any $n > 1$ can be written as $x + y$ ($x, y > 0$) with\n$p_k(x) + p_m(y)$ prime. -/\ndef sunPolygonalPairs : Finset (ℕ × ℕ) :=\n  {(3, 4), (3, 6), (3, 28), (3, 46), (3, 52), (3, 82), (3, 88),\n   (4, 7), (4, 15), (4, 25), (4, 27), (4, 37), (4, 43), (4, 63), (4, 67), (4, 97),\n   (6, 25), (6, 43), (6, 73),\n   (7, 10), (7, 18), (7, 100),\n   (10, 15), (10, 19), (10, 27), (10, 37), (10, 55), (10, 75), (10, 79), (10, 87), (10, 99)}\n\n/--\nThe only pairs $(k, m)$ with $2 < k \\le 10$ and $k < m \\le 100$ such that any integer $n > 1$ can\nbe written as $x + y$ ($x, y > 0$) with $p_k(x) + p_m(y)$ prime, are the $31$ pairs in\n`sunPolygonalPairs`.\n- _Zhi-Wei Sun_\n-/\n@[category research open, AMS 11]\ntheorem conjecture_5 (k m : ℕ) (hk : 2 < k) (hk10 : k ≤ 10) (hm : k < m) (hm100 : m ≤ 100) :\n    (∀ n : ℕ, 1 < n → ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧\n      Nat.Prime (Nat.polygonalNumber k x + Nat.polygonalNumber m y)) ↔\n    (k, m) ∈ sunPolygonalPairs := by\n  sorry\n\nend OeisA228425\n",
  "statement_hash": "b3e1df75d63703c6c8895e6f7ac022ec2b3ddcb5ba49c9c24ad3210c8d9e4f35",
  "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."
}