login
A306250
Number of ways to write n as x*(3x+1) + y*(3y-1) + z*(3z+2) + w*(3w-2), where x,y,z,w are nonnegative integers with x*y*z = 0.
2
1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 3, 1, 1, 1, 3, 4, 3, 3, 2, 2, 2, 2, 2, 2, 4, 3, 3, 3, 3, 2, 4, 3, 3, 2, 2, 4, 4, 4, 4, 2, 5, 4, 1, 3, 3, 5, 3, 4, 4, 4, 3, 3, 2, 2, 6, 4, 6, 4, 6, 4, 4, 4, 3, 2, 5, 4, 4, 3, 5, 4, 7, 4, 2, 2, 4, 8, 3, 4, 6, 4, 5, 6, 3, 5, 5, 6, 6, 5, 4, 5, 3, 4, 2, 4, 5, 6, 6, 7, 6, 1, 8
OFFSET
0,6
COMMENTS
Conjecture: a(n) > 0 for any nonnegative integer n.
Clearly, a(n) <= A306242(n). We have verified a(n) > 0 for all n = 0..10^6.
LINKS
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(12) = 1 with 12 = 1*(3*1+1) + 0*(3*0-1) + 0*(3*0+2) + 2*(3*2-2).
a(42) = 1 with 42 = 0*(3*0+1) + 1*(3*1-1) + 0*(3*0+2) + 4*(3*4-2).
a(62) = 3 with 62 = 3*(3*3+1) + 3*(3*3-1) + 0*(3*0+2) + 2*(3*2-2)
= 4*(3*4+1) + 2*(3*2-1) + 0*(3*0+2) + 0*(3*0-2) = 4*(3*4+1) + 1*(3*1-1) + 0*(3*0+2) + 2*(3*2-2).
a(99) = 1 with 99 = 2*(3*2+1) + 0*(3*0-1) + 5*(3*5+2) + 0*(3*0-2).
a(118) = 1 with 118 = 0*(3*0+1) + 6*(3*6-1) + 2*(3*2+2) + 0*(3*0-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, If[x>0&&y>0, 0, (Sqrt[12(n-x(3x+2)-y(3y+1))+1]+1)/6]}]; tab=Append[tab, r], {n, 0, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 01 2019
STATUS
approved