Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Partitions of nn into x+yx + y with x(x+1)/2+y2x(x+1)/2 + y^2 prime

Source:OEIS conjectures
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Conjecture: a(n)>0a(n) > 0 for all n>1n > 1.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05476 [math.NT] · NS.05476v1 for this version
Declaration:OeisA228425.conjecture_1
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:b3e1df75d63703c6c8895e6f7ac022ec2b3ddcb5ba49c9c24ad3210c8d9e4f35
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/228425.lean

Formal statement

theorem conjecture_1 (n : ℕ) (hn : n > 1) : a n > 0
Show the full Challenge.lean (122 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Partitions of $n$ into $x + y$ with $x(x+1)/2 + y^2$ prime

Number of ways to write $n = x + y$ ($x, y > 0$) with $x(x+1)/2 + y^2$ prime.

*References:*
- [A228425](https://oeis.org/A228425)
-/

@[expose] public section

namespace OeisA228425

/-- Number of ways to write $n = x + y$ ($x, y > 0$) with $x(x+1)/2 + y^2$ prime. -/
def a (n : ℕ) : ℕ :=
  (Finset.Ico 1 n).filter (fun x : ℕ =>
    let y := n - x
    Nat.Prime (x * (x + 1) / 2 + y ^ 2)
  ) |>.card

@[category test, AMS 11]
theorem a_1 : a 1 = 0 := by decide

@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by decide

@[category test, AMS 11]
theorem a_3 : a 3 = 1 := by decide

@[category test, AMS 11]
theorem a_4 : a 4 = 2 := by decide

@[category test, AMS 11]
theorem a_5 : a 5 = 2 := by decide

/--
Conjecture: $a(n) > 0$ for all $n > 1$.
-/
@[category research open, AMS 11]
theorem conjecture_1 (n : ℕ) (hn : n > 1) : a n > 0 := by
  sorry

/--
We also conjecture that any integer $n > 1$ can be written as $x + y$ ($x, y > 0$) with
$p_k(x) + p_{k+1}(y)$ prime, if and only if $k$ is among $3, 39, 99$.
-/
@[category research open, AMS 11]
theorem conjecture_2 (k : ℕ) (hk : 3 ≤ k) :
    (∀ n : ℕ, 1 < n → ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧
      Nat.Prime (Nat.polygonalNumber k x + Nat.polygonalNumber (k + 1) y)) ↔
    k = 3 ∨ k = 39 ∨ k = 99 := by
  sorry

/--
The pair $(k, m)$ works if $k$ is among $3, 4, 6$, and $m > k$ is not congruent to $k$ modulo $2$,
in the sense that all sufficiently large integers $n$ can be written as $x + y$ ($x, y > 0$) with
$p_k(x) + p_m(y)$ prime.
- _Zhi-Wei Sun_
-/
@[category research open, AMS 11]
theorem conjecture_3 (k m : ℕ) (hk : k = 3 ∨ k = 4 ∨ k = 6) (hm : k < m)
    (hmod : ¬ m ≡ k [MOD 2]) :
    ∀ᶠ (n : ℕ) in Filter.atTop, ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧
      Nat.Prime (Nat.polygonalNumber k x + Nat.polygonalNumber m y) := by
  sorry

/--
For $k = 5$, the pair $(5, m)$ works (with $m > 5$) if $m$ is congruent to $0$ or $4$ modulo $6$,
in the sense that all sufficiently large integers $n$ can be written as $x + y$ ($x, y > 0$) with
$p_5(x) + p_m(y)$ prime.
- _Zhi-Wei Sun_
-/
@[category research open, AMS 11]
theorem conjecture_4 (m : ℕ) (hm : 5 < m) (hmod : m ≡ 0 [MOD 6] ∨ m ≡ 4 [MOD 6]) :
    ∀ᶠ (n : ℕ) in Filter.atTop, ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧
      Nat.Prime (Nat.polygonalNumber 5 x + Nat.polygonalNumber m y) := by
  sorry

/-- The set of pairs $(k, m)$ with $2 < k \le 10$ and $k < m \le 100$ conjectured by Zhi-Wei Sun
to satisfy the property that any $n > 1$ can be written as $x + y$ ($x, y > 0$) with
$p_k(x) + p_m(y)$ prime. -/
def sunPolygonalPairs : Finset (ℕ × ℕ) :=
  {(3, 4), (3, 6), (3, 28), (3, 46), (3, 52), (3, 82), (3, 88),
   (4, 7), (4, 15), (4, 25), (4, 27), (4, 37), (4, 43), (4, 63), (4, 67), (4, 97),
   (6, 25), (6, 43), (6, 73),
   (7, 10), (7, 18), (7, 100),
   (10, 15), (10, 19), (10, 27), (10, 37), (10, 55), (10, 75), (10, 79), (10, 87), (10, 99)}

/--
The only pairs $(k, m)$ with $2 < k \le 10$ and $k < m \le 100$ such that any integer $n > 1$ can
be written as $x + y$ ($x, y > 0$) with $p_k(x) + p_m(y)$ prime, are the $31$ pairs in
`sunPolygonalPairs`.
- _Zhi-Wei Sun_
-/
@[category research open, AMS 11]
theorem conjecture_5 (k m : ℕ) (hk : 2 < k) (hk10 : k ≤ 10) (hm : k < m) (hm100 : m ≤ 100) :
    (∀ n : ℕ, 1 < n → ∃ x y : ℕ, 0 < x ∧ 0 < y ∧ x + y = n ∧
      Nat.Prime (Nat.polygonalNumber k x + Nat.polygonalNumber m y)) ↔
    (k, m) ∈ sunPolygonalPairs := by
  sorry

end OeisA228425

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA228425.conjecture_1 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture_1 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch oeis-228425
nosorry submit oeis-228425 nosorry/oeis-228425/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.