OFFSET
0,3
COMMENTS
Conjecture: a(n) > 0 for all n. Also, any nonnegative integer can be written as x*(3*x-1)/2 + y*(3*y-1) + z*(3*z+1)/2 with x,y nonnegative integers and z an integer, and each n = 0,1,2,... can be expressed as x*(3*x+1)/2 + 3*y*(3*y+1)/2 + z*(3*z+1)/2 with x,y nonnegative integers and z an integer.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
EXAMPLE
a(8) = 1 since 8 = 1*(3*1-1)/2 + 2*(3*2+1)/2 + 0*(3*0+1).
a(23) = 1 since 23 = 3*(3*3-1)/2 + 2*(3*2+1)/2 + 1*(3*1+1).
MATHEMATICA
PQ[n_]:=IntegerQ[Sqrt[12n+1]]
Do[r=0; Do[If[PQ[n-x(3x-1)/2-y(3y+1)/2], r=r+1], {x, 0, (Sqrt[24n+1]+1)/6}, {y, 0, (Sqrt[24(n-x(3x-1)/2)+1]-1)/6}];
Print[n, " ", r]; Continue, {n, 0, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 11 2015
STATUS
approved