{
  "id": "4996",
  "ident": "NS.04996",
  "slug": "oeis-160324--conjecture2",
  "title": "Number of ways to express $n$ as sum of square, pentagonal, and hexagonal numbers · conjecture2",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "For each integer $m > 2$, any natural number $n$ can be written in the form\n$p_{m+1}(x_1) + \\cdots + p_{2m}(x_m)$ with $x_1, \\dots, x_m$ nonnegative integers, where\n$p_k(x) = (k-2)x(x-1)/2 + x$ ($x=0,1,2,\\dots$) are $k$-gonal numbers.\n- _Zhi-Wei Sun_, Aug 15 2009",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA160324.conjecture2",
  "statement_lean": "theorem conjecture2 (m : ℕ) (hm : m > 2) (n : ℕ) :\n    ∃ x : Fin m → ℕ, n = ∑ i : Fin m, polygonalNumber (m + (i : ℕ) + 1) (x i)",
  "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# Number of ways to express $n$ as sum of square, pentagonal, and hexagonal numbers\n\n$$a(n) = |\\{(x, y, z) \\in \\mathbb{N}^3 : x^2 + p_5(y) + p_6(z) = n\\}|$$\n\n*References:*\n- [A160324](https://oeis.org/A160324)-/\n\n@[expose] public section\n\nnamespace OeisA160324\n\n/-- $p_k(x) = \\frac{(k-2)x(x-1)}{2} + x$ is the $x$-th $k$-gonal number. -/\ndef polygonalNumber (k x : ℕ) : ℕ :=\n  (k - 2) * (x * (x - 1) / 2) + x\n\n/-- $p_5(y) = \\frac{3y^2 - y}{2}$ is the $y$-th pentagonal number. -/\ndef pentagonal (y : ℕ) : ℕ := polygonalNumber 5 y\n\n/-- $p_6(z) = 2z^2 - z$ is the $z$-th hexagonal number. -/\ndef hexagonal (z : ℕ) : ℕ := polygonalNumber 6 z\n\n/-- Number of representations of $n$ as sum of square, pentagonal, and hexagonal numbers. -/\ndef a (n : ℕ) : ℕ :=\n  let max_coord_bound := n.sqrt + 2\n  ∑ x ∈ Finset.range max_coord_bound,\n    ∑ y ∈ Finset.range max_coord_bound,\n      ∑ z ∈ Finset.range max_coord_bound,\n        if x ^ 2 + pentagonal y + hexagonal z = n then 1 else 0\n\n/-- Value of the sequence `a` at 0. -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by decide +native\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 3 := by decide +native\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 3 := by decide +native\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 1 := by decide +native\n\n/--\nIn April 2009, _Zhi-Wei Sun_ conjectured that $a(n) > 0$ for every $n = 0, 1, 2, 3, \\dots$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture1 (n : ℕ) : 0 < a n := by\n  sorry\n\n/--\nFor each integer $m > 2$, any natural number $n$ can be written in the form\n$p_{m+1}(x_1) + \\cdots + p_{2m}(x_m)$ with $x_1, \\dots, x_m$ nonnegative integers, where\n$p_k(x) = (k-2)x(x-1)/2 + x$ ($x=0,1,2,\\dots$) are $k$-gonal numbers.\n- _Zhi-Wei Sun_, Aug 15 2009\n-/\n@[category research open, AMS 11]\ntheorem conjecture2 (m : ℕ) (hm : m > 2) (n : ℕ) :\n    ∃ x : Fin m → ℕ, n = ∑ i : Fin m, polygonalNumber (m + (i : ℕ) + 1) (x i) := by\n  sorry\n\n/--\nThe sequence contains every positive integer.\n- _Zhi-Wei Sun_, Sep 04 2009\n-/\n@[category research open, AMS 11]\ntheorem conjecture3 (k : ℕ) (hk : 0 < k) : ∃ n : ℕ, a n = k := by\n  sorry\n\n/--\nConjecture (Zhi-Wei Sun, Aug 21 2009):\nFor any integer $m > 2$, each natural number $n$ can be expressed as\n$p_{m+1}(x_1) + p_{m+2}(x_2) + p_{m+3}(x_3) + r$ with $x_1, x_2, x_3 \\in \\mathbb{N}$ and\n$r \\in \\{0, \\dots, m-3\\}$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture4 (m : ℕ) (hm : 2 < m) (n : ℕ) :\n    ∃ x1 x2 x3 r : ℕ, r ≤ m - 3 ∧\n      n = polygonalNumber (m + 1) x1 + polygonalNumber (m + 2) x2 + polygonalNumber (m + 3) x3 + r := by\n  sorry\n\n/--\nConjecture (Zhi-Wei Sun, Aug 21 2009):\nFor each integer $m > 2$, all sufficiently large integers $n$ can be expressed in the form\n$p_{m+1}(x_1) + p_{m+2}(x_2) + p_{m+3}(x_3)$ with $x_1, x_2, x_3 \\in \\mathbb{N}$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture5 (m : ℕ) (hm : 2 < m) :\n    ∀ᶠ n in Filter.atTop,\n      ∃ x1 x2 x3 : ℕ, n = polygonalNumber (m + 1) x1 + polygonalNumber (m + 2) x2 + polygonalNumber (m + 3) x3 := by\n  sorry\n\nend OeisA160324\n\n",
  "statement_hash": "d1d1e3c6e854d4b19ca24fac0a454a302abc668ec745cfba5cdf214c4a3e46b7",
  "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."
}