{
  "id": "4971",
  "ident": "NS.04971",
  "slug": "oeis-157237",
  "title": "Representations as $p + 2^x + 11 \\cdot 2^y$ with $p \\equiv 1 \\pmod 6$",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "On Feb. 24, 2009, Zhi-Wei Sun conjectured that $a(n) = 0$ if and only if $n < 16$ or\n$n \\in \\{18, 21, 24, 51, 84, 1011, 59586\\}$; in other words, except for\n$35, 41, 47, 101, 167, 2021, 119171$, any odd integer greater than $30$ can be written as the\nsum of a prime congruent to $1 \\bmod 6$, a positive power of $2$ and eleven times a positive\npower of $2$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA157237.conjecture",
  "statement_lean": "theorem conjecture (n : ℕ) (hn : 0 < n) :\n    a n = 0 ↔ n ≤ 15 ∨ n = 18 ∨ n = 21 ∨ n = 24 ∨ n = 51 ∨ n = 84 ∨ n = 1011 ∨ n = 59586",
  "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# Representations as $p + 2^x + 11 \\cdot 2^y$ with $p \\equiv 1 \\pmod 6$\n\nNumber of ways to write the $n$-th positive odd integer in the form $p + 2^x + 11 \\cdot 2^y$\nwith $p$ a prime congruent to $1 \\bmod 6$ and $x, y$ positive integers.\n$$a(n) = \\left|\\left\\{(p, x, y) : p + 2^x + 11 \\cdot 2^y = 2n - 1 \\text{ with } p \\text{ prime},\np \\equiv 1 \\pmod 6, x, y \\in \\mathbb{Z}^+\\right\\}\\right|.$$\n\n*References:*\n- [A157237](https://oeis.org/A157237)\n- Z.-W. Sun, \"Mixed sums of primes and other terms\", arXiv preprint\n  [arXiv:0901.3075](https://arxiv.org/abs/0901.3075) [math.NT], 2009.-/\n\n@[expose] public section\n\nnamespace OeisA157237\n\n/-- Number of representations of $2n - 1$ as $p + 2^x + 11 \\cdot 2^y$ with $p \\equiv 1 \\pmod 6$. -/\ndef a (n : ℕ) : ℕ :=\n  if n = 0 then 0\n  else\n    let N := 2 * n - 1\n    ∑ x ∈ Finset.Icc 1 N,\n    ∑ y ∈ Finset.Icc 1 N,\n      if 2 ^ x + 11 * 2 ^ y < N ∧\n         (N - (2 ^ x + 11 * 2 ^ y)).Prime ∧\n         (N - (2 ^ x + 11 * 2 ^ y)) % 6 = 1 then 1 else 0\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 0 := by decide\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 0 := by decide\n\n/-- Value of the sequence `a` at 16. -/\n@[category test, AMS 11]\ntheorem a_16 : a 16 = 1 := by decide\n\n/-- Value of the sequence `a` at 17. -/\n@[category test, AMS 11]\ntheorem a_17 : a 17 = 1 := by decide\n\n/-- Value of the sequence `a` at 18. -/\n@[category test, AMS 11]\ntheorem a_18 : a 18 = 0 := by decide\n\n/-- Value of the sequence `a` at 19. -/\n@[category test, AMS 11]\ntheorem a_19 : a 19 = 2 := by decide\n\n/--\nOn Feb. 24, 2009, Zhi-Wei Sun conjectured that $a(n) = 0$ if and only if $n < 16$ or\n$n \\in \\{18, 21, 24, 51, 84, 1011, 59586\\}$; in other words, except for\n$35, 41, 47, 101, 167, 2021, 119171$, any odd integer greater than $30$ can be written as the\nsum of a prime congruent to $1 \\bmod 6$, a positive power of $2$ and eleven times a positive\npower of $2$.-/\n@[category research open, AMS 11]\ntheorem conjecture (n : ℕ) (hn : 0 < n) :\n    a n = 0 ↔ n ≤ 15 ∨ n = 18 ∨ n = 21 ∨ n = 24 ∨ n = 51 ∨ n = 84 ∨ n = 1011 ∨ n = 59586 := by\n  sorry\n\nend OeisA157237\n",
  "statement_hash": "40d2d1f4554412bc3ef76b650a4451f7b40cae8bf0b9c0236e4397d6b8c29d24",
  "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."
}