%I #23 May 26 2016 13:39:07
%S 1,1,2,2,1,1,4,1,1,3,1,3,2,1,3,3,2,3,5,2,3,4,6,1,3,5,1,6,1,3,7,2,2,5,
%T 6,5,6,3,6,4,1,3,4,5,4,5,7,2,3,8,6,7,3,4,8,3,2,6,3,5,7,3,8,7,2,4,10,4,
%U 4,7,9,7,2,4,2,7,3,5,11,2,4
%N Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 2*x + y - z a nonnegative cube, where x,y,z,w are nonnegative integers with y <= z.
%C Conjecture: (i) For each c = 1, 2, 4 and n = 0,1,2,..., we can write n as x^2 + y^2 + z^2 + w^2 with c*(2x+y-z) a nonnegative cube, where x,y,z,w are nonnegative integers with y <= z.
%C (ii) Each n = 0,1,2,.... can be written as x^2 + y^2 + z^2 + w^2 with x-y+z a nonnegative cube, where x,y,z,w are integers with x >= y >= 0 and x >= |z|.
%C The author proved in arXiv:1604.06723 that for each a = 1, 2 any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that x + y + a*z is a cube.
%C See also A273458 for a similar conjecture.
%C For more conjectural refinements of Lagrange's four-square theorem, see the author's preprint arXiv:1604.06723.
%H Zhi-Wei Sun, <a href="/A273432/b273432.txt">Table of n, a(n) for n = 0..10000</a>
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1604.06723">Refining Lagrange's four-square theorem</a>, arXiv:1604.06723 [math.GM], 2016.
%e a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 = 0 and 2*0 + 0 - 0 = 0^3.
%e a(4) = 1 since 4 = 0^2 + 0^2 + 0^2 + 2^2 with 0 = 0 and 2*0 + 0 - 0 = 0^3.
%e a(8) = 1 since 8 = 0^2 + 2^2 + 2^2 + 0^2 with 2 = 2 and 2*0 + 2 - 2 = 0^3.
%e a(10) = 1 since 10 = 1^2 + 1^2 + 2^2 + 2^2 with 1 < 2 and 2*1 + 1 - 2 = 1^3.
%e a(13) = 1 since 13 = 2^2 + 0^2 + 3^2 + 0^2 with 0 < 3 and 2*2 + 0 - 3 = 1^3.
%e a(23) = 1 since 23 = 1^2 + 2^2 + 3^2 + 3^2 with 2 < 3 and 2*1 + 2 - 3 = 1^3.
%e a(26) = 1 since 26 = 1^2 + 3^2 + 4^2 + 0^2 with 3 < 4 and 2*1 + 3 - 4 = 1^3.
%e a(28) = 1 since 28 = 4^2 + 2^2 + 2^2 + 2^2 with 2 = 2 and 2*4 + 2 - 2 = 2^3.
%e a(40) = 1 since 40 = 4^2 + 2^2 + 2^2 + 4^2 with 2 = 2 and 2*4 + 2 - 2 = 2^3.
%e a(104) = 1 since 104 = 4^2 + 6^2 + 6^2 + 4^2 with 6 = 6 and 2*4 + 6 - 6 = 2^3.
%e a(138) = 1 since 138 = 3^2 + 5^2 + 10^2 + 2^2 with 5 < 10 and 2*3 + 5 - 10 =1^3.
%e a(200) = 1 since 200 = 0^2 + 10^2 + 10^2 + 0^2 with 10 = 10 and 2*0 + 10 - 10 = 0^3.
%e a(296) = 1 since 296 = 8^2 + 6^2 + 14^2 + 0^2 with 6 < 14 and 2*8 + 6 - 14 = 2^3.
%e a(328) = 1 since 328 = 0^2 + 6^2 + 6^2 + 16^2 with 6 = 6 and 2*0 + 6 - 6 = 0^3.
%e a(520) = 1 since 520 = 4^2 + 2^2 + 10^2 + 20^2 with 2 < 10 and 2*4 + 2 - 10 = 0^3.
%e a(776) = 1 since 776 = 0^2 + 10^2 + 10^2 + 24^2 with 10 = 10 and 2*0 + 10 - 10 = 0^3.
%e a(1832) = 1 since 1832 = 4^2 + 30^2 + 30^2 + 4^2 with 30 = 30 and 2*4 + 30 - 30 = 2^3.
%e a(2976) = 1 since 2976 = 20^2 + 16^2 + 48^2 + 4^2 with 16 < 48 and 2*20 + 16 - 48 = 2^3.
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
%t CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)]
%t Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&CQ[2x+y-z],r=r+1],{x,0,n^(1/2)},{y,0,Sqrt[(n-x^2)/2]},{z,y,Min[2x+y,Sqrt[n-x^2-y^2]]}];Print[n," ",r];Continue,{n,0,80}]
%Y Cf. A000118, A000290, A000578, A260625, A261876, A262357, A267121, A268197, A268507, A269400, A270073, A270969, A271510, A271513, A271518, A271608, A271665, A271714, A271721, A271724, A271775, A271778, A271824, A272084, A272332, A272351, A272620, A272888, A272977, A273021, A273107, A273108, A273110, A273134, A273278, A273294, A273302, A273404, A273429, A273458, A273568.
%K nonn
%O 0,3
%A _Zhi-Wei Sun_, May 22 2016