%I #10 Mar 14 2018 08:47:46
%S 1,4,4,2,5,6,2,2,4,5,7,1,3,7,2,3,5,7,7,2,6,1,2,2,2,11,7,3,3,8,5,1,4,5,
%T 9,4,6,8,6,4,7,9,3,3,2,9,2,1,3,6,16,5,9,7,6,5,1,5,9,4,4,7,5,5,5,17,6,
%U 4,7,3,6,3,6,11,11,4,3,1,8,2,6
%N Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x or 2*y or z is a square and (12*x)^2 + (21*y)^2 + (28*z)^2 is also a square.
%C Conjecture 1: a(n) > 0 for all n = 0,1,2,....
%C Conjecture 2: Any positive integer can be written as x^2 + y^2 + z^2 + w^2 with w a positive integer and x,y,z nonnegative integers such that x or y or z is a square and 144*x^2 + 505*y^2 + 720*z^2 is also a square.
%C By the author's 2017 JNT paper, each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that x (or 2*x) is a square.
%C In 2016, the author conjectured in A271510 that each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and y >= z such that (3*x)^2 + (4*y)^2 + (12*z)^2 is a square.
%C See also A300791 and A300792 for similar conjectures.
%H Zhi-Wei Sun, <a href="/A300844/b300844.txt">Table of n, a(n) for n = 0..10000</a>
%H Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2016.11.008">Refining Lagrange's four-square theorem</a>, J. Number Theory 175(2017), 167-190.
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017-2018.
%e a(11) = 1 since 11 = 0^2 + 1^2 + 1^2 + 3^2 with 0 = 0^2 and (12*0)^2 + (21*1)^2 + (28*1)^2 = 35^2.
%e a(56) = 1 since 56 = 4^2 + 6^2 + 2^2 + 0^2 with 4 = 2^2 and (12*4)^2 + (21*6)^2 + (28*2)^2 = 146^2.
%e a(77) = 1 since 77 = 4^2 + 0^2 + 5^2 + 6^2 with 4 = 2^2 and (12*4)^2 + (21*0)^2 + (28*5)^2 = 148^2.
%e a(184) = 1 since 184 = 12^2 + 2^2 + 0^2 + 6^2 with 0 = 0^2 and (12*12)^2 + (21*2)^2 + (28*0)^2 = 150^2.
%e a(599) = 1 since 599 = 21^2 + 11^2 + 1^2 + 6^2 with 1 = 1^2 and (12*21)^2 + (21*11)^2 + (28*1)^2 = 343^2.
%e a(7836) = 1 since 7836 = 38^2 + 18^2 + 68^2 + 38^2 with 2*18 = 6^2 and (12*38)^2 + (21*18)^2 + (28*68)^2 = 1994^2.
%e a(15096) = 1 since 15096 = 16^2 + 6^2 + 52^2 + 110^2 with 16 = 4^2 and (12*16)^2 + (21*6)^2 + (28*52)^2 = 1474^2.
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t tab={};Do[r=0;Do[If[(SQ[x]||SQ[2y]||SQ[z])&&SQ[(12x)^2+(21y)^2+(28z)^2]&&SQ[n-x^2-y^2-z^2],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];tab=Append[tab,r],{n,0,80}]
%Y Cf. A000118, A000290, A271510, A271513, A271518, A281976, A300666, A300667, A300708, A300712, A300751, A300752, A300791, A300792.
%K nonn
%O 0,2
%A _Zhi-Wei Sun_, Mar 13 2018