OFFSET
0,3
COMMENTS
Conjecture: a(n) > 0 for all n. Moreover, each nonnegative integer n is either an odd prime, or a generalized pentagonal number, or the sum of an odd prime and a generalized pentagonal number.
This is similar to the author's earlier conjecture on sums of primes and triangular numbers (see the reference and also A132399).
The conjecture has been verified for all n = 0..10^9.
REFERENCES
Zhi-Wei Sun, On sums of primes and triangular numbers, J. Comb. Number Theory 1(2009), 65-76.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, On sums of primes and triangular numbers, arXiv:0803.3737 [math.NT], 2008-2009.
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
EXAMPLE
a(11) = 1 since 11 = 11 + 0*(3*0-1)/2 with 11 prime.
a(15) = 1 since 15 = 0 + (-3)*(3*(-3)-1)/2.
a(50) = 1 since 50 = 43 + (-2)*(3*(-2)-1)/2 with 43 prime.
MATHEMATICA
P[n_]:=(n==0)||PrimeQ[n]
Do[r=0; Do[If[P[n-x(3x-1)/2], r=r+1], {x, -Floor[(Sqrt[24n+1]-1)/6], Floor[(Sqrt[24n+1]+1)/6]}]; Print[n, " ", r]; Label[aa]; Continue, {n, 0, 100}]
PROG
(PARI) a(n)=if(n==0, return(1)); sum(x=1, (1+sqrt(24*n+1))\6, isprime(n-x*(3*x-1)/2))+sum(x=0, (sqrt(24*n+1)-1)\6, isprime(n-x*(3*x+1)/2))+ispolygonal(n, 5)+(x->3*x^2+x==2*n)(round((sqrt(24*n+1)-1)/6)) \\ Charles R Greathouse IV, Apr 07 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 13 2015
STATUS
approved