login
A306439
Number of ways to write n as x*(3x+1)/2 + y*(3y+1)/2 + z*(3z+1) + 3w*(3w+1)/2, where x,y,z,w are nonnegative integers with x <= y.
1
1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, 2, 3, 2, 1, 2, 2, 2, 2, 4, 2, 3, 2, 3, 2, 3, 4, 3, 4, 1, 5, 1, 5, 3, 5, 4, 3, 4, 5, 1, 5, 3, 4, 4, 3, 7, 2, 4, 4, 7, 6, 6, 4, 4, 5, 3, 7, 5, 5, 8, 6, 7, 3, 6, 8, 6, 5, 4, 3, 4, 6, 7, 3, 7, 6, 10, 7, 5, 9, 3, 11, 4, 9, 7, 7, 10, 5, 9, 7, 7, 10, 8, 7, 5, 5, 9, 5, 9, 9
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, 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