OFFSET
0,6
COMMENTS
Conjecture: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 0, 1, 2, 3, 4, 9, 13. Moreover, any nonnegative integer n can be written as x*(3x+1) + y*(3y-1) + z*(3z+2) + w*(3w-2), where x,y,z,w are nonnegative integers with x or y even.
The conjecture has been verified for n up to 10^6.
By Theorem 1.3 of the linked 2017 paper of the author, each nonnegative integer can be written as x*(3x+1) + y*(3y-1) + z*(3z+2) + 0*(3*0-2) with x,y,z integers.
We also have some other similar conjectures. For example, we conjecture that every n = 0,1,2,... can be written as x*(5x+1)/2 + y*(5y-1)/2 + z*(5z+3)/2 + w*(5w-3)/2 with x,y,z,w nonnegative integers.
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.
Zhi-Wei Sun, On x(ax+1)+y(by+1)+z(cz+1) and x(ax+b)+y(ay+c)+z(az+d), J. Number Theory 171(2017), 275-283.
EXAMPLE
a(1) = 1 with 1 = 0*(3*0+1) + 0*(3*0-1) + 0*(3*0+2) + 1*(3*1-2).
a(3) = 1 with 3 = 0*(3*0+1) + 1*(3*1-1) + 0*(3*0+2) + 1*(3*1-2).
a(4) = 1 with 4 = 1*(3*1+1) + 0*(3*0-1) + 0*(3*0+2) + 0*(3*0-2).
a(9) = 1 with 9 = 1*(3*1+1) + 0*(3*0-1) + 1*(3*1+2) + 0*(3*0-2).
a(13) = 1 with 13 = 0*(3*0+1) + 0*(3*0-1) + 1*(3*1+2) + 2*(3*2-2).
MATHEMATICA
OctQ[n_]:=OctQ[n]=IntegerQ[Sqrt[3n+1]]&&(n==0||Mod[Sqrt[3n+1]+1, 3]==0);
tab={}; Do[r=0; Do[If[OctQ[n-x(3x+2)-y(3y+1)-z(3z-1)], r=r+1], {x, 0, (Sqrt[3n+1]-1)/3}, {y, 0, (Sqrt[12(n-x(3x+2))+1]-1)/6}, {z, 0, (Sqrt[12(n-x(3x+2)-y(3y+1))+1]+1)/6}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 31 2019
STATUS
approved