%I #11 May 01 2016 13:23:25
%S 1,1,1,1,2,1,1,1,2,3,3,1,2,1,2,1,3,3,2,2,1,2,3,1,3,4,4,1,4,1,2,1,3,3,
%T 3,2,2,1,2,3,5,4,2,3,3,3,2,1,2,6,6,2,3,2,2,1,3,4,4,2,3,1,6,1,5,3,4,3,
%U 4,1,4,3,4,8,4,2,1,3,2,2,5,4,4,1,6,3,6,2,5,6,7,3,2,2,2,1,3,5,9,3
%N Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 4*x^2 + 5*y^2 + 20*z*w a square, where x,y,z,w are nonnegative integers with z < w.
%C Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 2^k*q (k = 0,1,2,... and q = 1, 3, 7), 4^k*m (k = 0,1,2,... and m = 21, 30, 38, 62, 70, 77, 142, 217, 237, 302, 382, 406, 453, 670).
%C (ii) For each triple (a,b,c) = (1,8,8), (7,9,-12), (9,40,-24), (9,40,-60), any positive integer can be written as x^2 + y^2 + z^2 + w^2 with a*x^2 + b*y^2 + c*z*w a square, where w is a positive integer and x,y,z are nonnegative integers.
%C (iii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with (3*x+5*y)^2 -24*z*w a square, where x,y,z,w are nonnegative integers. Also, for each ordered pair (a,b) = (1,4), (1,8), (1,12), (1,24), (1,32), (1,48), (25,24), (1,-4), (9,-4), (121,-20), every natural number can be written as x^2 + y^2 + z^2 + w^2 with a*x^2 + b*y*z a square, where x,y,z,w are nonnegative integers.
%C (iv) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with (x^2-y^2)*(w^2-2*z^2) (or (x^2-y^2)*(2*w^2-z^2) or (x^2-y^2)*(w^2-5*z^2)) a square, where w,x,y,z are integers.
%C See also A262357, A268507, A269400, A271510, A271513, A271518, A271665, A271714, A271721, A271724, A271775, A271778 and A271824 for other conjectures refining Lagrange's four-square theorem.
%H Zhi-Wei Sun, <a href="/A272084/b272084.txt">Table of n, a(n) for n = 1..10000</a>
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1604.06723">Refining Lagrange's four-square theorem</a>, arXiv:1604.06723, 2016.
%e a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 < 1 and 4*0^2 + 5*0^2 + 20*0*1 = 0^2.
%e a(2) = 1 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 0 < 1 and 4*1^2 + 5*0^2 + 20*0*1 = 2^2.
%e a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 0 < 1 and 4*1^2 + 5*1^2 + 20*0*1 = 3^2.
%e a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 0 < 2 and 4*1^2 + 5*1^2 + 20*0*2 = 3^2.
%e a(14) = 1 since 14 = 1^2 + 3^2 + 0^2 + 2^2 with 0 < 2 and 4*1^2 + 5*3^2 + 20*0*2 = 7^2.
%e a(21) = 1 since 21 = 0^2 + 2^2 + 1^2 + 4^2 with 1 < 4 and 4*0^2 + 5*2^2 + 20*1*4 = 10^2.
%e a(30) = 1 since 30 = 4^2 + 2^2 + 1^2 + 3^2 with 1 < 3 and 4*4^2 + 5*2^2 + 20*1*3 = 12^2.
%e a(38) = 1 since 38 = 1^2 + 1^2 + 0^2 + 6^2 with 0 < 6 and 4*1^2 + 5*1^2 + 20*0*6 = 3^2.
%e a(62) = 1 since 62 = 1^2 + 3^2 + 4^2 + 6^2 with 4 < 6 and 4*1^2 + 5*3^2 + 20*4*6 = 23^2.
%e a(70) = 1 since 70 = 7^2 + 1^2 + 2^2 + 4^2 with 2 < 4 and 4*7^2 + 5*1^2 + 20*2*4 = 19^2.
%e a(77) = 1 since 77 = 4^2 + 6^2 + 3^2 + 4^2 with 3 < 4 and 4*4^2 + 5*6^2 + 20*3*4 = 22^2.
%e a(142) = 1 since 142 = 4^2 + 6^2 + 3^2 + 9^2 with 3 < 9 and 4*4^2 + 5*6^2 + 20*3*9 = 28^2.
%e a(217) = 1 since 217 = 6^2 + 6^2 + 8^2 + 9^2 with 8 < 9 and 4*6^2 + 5*6^2 + 20*8*9 = 42^2.
%e a(237) = 1 since 237 = 5^2 + 8^2 + 2^2 + 12^2 with 2 < 12 and 4*5^2 + 5*8^2 + 20*2*12 = 30^2.
%e a(302) = 1 since 302 = 11^2 + 9^2 + 6^2 + 8^2 with 6 < 8 and 4*11^2 + 5*9^2 + 20*6*8 = 43^2.
%e a(382) = 1 since 382 = 11^2 + 7^2 + 4^2 + 14^2 with 4 < 14 and 4*11^2 + 5*4^2 + 20*4*14 = 43^2.
%e a(406) = 1 since 406 = 8^2 + 6^2 + 9^2 + 15^2 with 9 < 15 and 4*8^2 + 5*6^2 + 20*9*15 = 56^2.
%e a(453) = 1 since 453 = 8^2 + 14^2 + 7^2 + 12^2 with 7 < 12 and 4*8^2 + 5*14^2 + 20*7*12 = 54^2.
%e a(670) = 1 since 670 = 17^2 + 11^2 + 2^2 + 16^2 with 2 < 16 and 4*17^2 + 5*11^2 + 20*2*16 = 49^2.
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
%t Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[4x^2+5y^2+20*z*Sqrt[n-x^2-y^2-z^2]],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,0,Sqrt[(n-1-x^2-y^2)/2]}];Print[n," ",r];Continue,{n,1,100}]
%Y Cf. A000118, A000290, A262357, A268507, A269400, A271510, A271513, A271518, A271608, A271665, A271714, A271721, A271724, A271775, A271778, A271824.
%K nonn
%O 1,5
%A _Zhi-Wei Sun_, Apr 19 2016