OFFSET
0,5
COMMENTS
Conjecture 1: a(n) > 0 for all n > 5, and a(n) = 1 only for n = 0, 2, 7, 9, 11, 12, 16, 31, 33, 41.
Conjecture 2: Let n be any integer greater than 9, and let p(x) denote x*(3x+1)/2. For each c = 2, 4, 9, we can write n as p(x) + 2*p(y) + 3*p(z) + c*p(w) with x,y,z,w nonnegative integers.
See also Conjecture 5.2 of the linked 2016 paper.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, A result similar to Lagrange's theorem, J. Number Theory 162(2016), 190-211.
EXAMPLE
a(12) = 1 with 12 = 0*(3*0+1)/2 + 1*(3*1+1)/2 + 1*(3*1+1) + 3*1*(3*1+1)/2.
a(31) = 1 with 31 = 1*(3*1+1)/2 + 3*(3*3+1)/2 + 2*(3*2+1) + 3*0*(3*0+1)/2.
a(33) = 1 with 33 = 2*(3*2+1)/2 + 4*(3*4+1)/2 + 0*(3*0+1) + 3*0*(3*0+1)/2.
a(41) = 1 with 41 = 3*(3*3+1)/2 + 4*(3*4+1)/2 + 0*(3*0+1) + 3*0*(3*0+1)/2.
MATHEMATICA
PQ[n_]:=PQ[n]=IntegerQ[Sqrt[24n+1]]&&Mod[Sqrt[24n+1], 6]==1;
tab={}; Do[r=0; Do[If[PQ[n-3x(3x+1)/2-y(3y+1)-z(3z+1)/2], r=r+1], {x, 0, (Sqrt[8n+1]-1)/6}, {y, 0, (Sqrt[12(n-3x(3x+1)/2)+1]-1)/6}, {z, 0, (Sqrt[12(n-3x(3x+1)/2-y(3y+1))+1]-1)/6}]; tab=Append[tab, r], {n, 0, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 15 2019
STATUS
approved