login
A301375
Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z nonnegative integers and w a positive integer such that x*(y+3*z) is a cube or half a cube and y <= z <= w if x = 0.
1
1, 2, 2, 2, 3, 2, 2, 2, 3, 5, 2, 3, 4, 1, 1, 1, 5, 7, 3, 3, 5, 3, 1, 4, 6, 7, 4, 3, 6, 1, 4, 2, 6, 7, 1, 5, 4, 4, 2, 5, 5, 4, 5, 2, 8, 4, 2, 1, 4, 7, 5, 7, 6, 4, 3, 3, 4, 7, 2, 1, 5, 3, 2, 2, 7, 10, 6, 4, 6, 3, 4, 5, 9, 8, 5, 4, 2, 6, 2, 3
OFFSET
1,2
COMMENTS
Conjecture: a(n) > 0 for all n > 0.
We have verified this for all n = 1..3*10^6.
LINKS
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017-2018.
EXAMPLE
a(14) = 1 since 14 = 0^2 + 1^2 + 2^2 + 3^2 with 0*(1+3*2) = 0^3.
a(15) = 1 since 15 = 2^2 + 1^2 + 1^2 + 3^2 with 2*(1+3*1) = 2^3.
a(16) = 1 since 16 = 0^2 + 0^2 + 0^2 + 4^2 with 0*(0+3*0) = 0^3.
a(60) = 1 since 60 = 4^2 + 2^2 + 2^2 + 6^2 with 4*(2+3*2) = 4^3/2.
a(92) = 1 since 92 = 6^2 + 6^2 + 4^2 + 2^2 with 6*(6+3*4) = 6^3/2.
a(240) = 1 since 240 = 2^2 + 14^2 + 6^2 + 2^2 with 2*(14+3*6) = 4^3.
a(807) = 1 since 807 = 1^2 + 21^2 + 2^2 + 19^2 with 1*(21+3*2) = 3^3.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
QQ[n_]:=QQ[n]=CQ[n]||CQ[2n];
tab={}; Do[r=0; Do[If[QQ[x(y+3z)]&&SQ[n-x^2-y^2-z^2], r=r+1], {x, 0, Sqrt[n-1]}, {y, 0, Sqrt[If[x==0, n/3, n-1-x^2]]}, {z, If[x==0, y, 0], Sqrt[If[x==0, (n-x^2-y^2)/2, n-1-x^2-y^2]]}]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 19 2018
STATUS
approved