%I #24 Apr 30 2021 01:35:11
%S 1,2,3,2,2,2,2,1,1,3,4,3,1,3,3,2,2,5,6,3,3,3,3,1,1,4,7,5,2,4,3,3,3,4,
%T 7,3,5,3,5,3,2,6,6,3,1,5,3,2,2,4,7,5,6,4,4,2,1,3,5,3,2,4,4,4,2,7,10,6,
%U 3,5,4,2,2,6,9,5,3,4,5,1,2
%N Number of ways to write n as x^2 + y^2 + z^2 + w^2 with nonnegative integers x,y,z,w and z <= w such that x or 2*y is a square and x + 3*y is also a square.
%C Conjecture 1: a(n) > 0 for all n = 0,1,2,....
%C Conjecture 2: Any nonnegative integer n not equal to 3 can be written as x^2 + y^2 + z^2 + w^2 with nonnegative integers x,y,z,w such that x or 2*y is a square and 3*x - y 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 integers x,y,z,w such that x (or 2*x) is a square.
%C See also A281976, A300667, A300708 and A300712 for similar conjectures.
%C a(n) > 0 for all n = 0..10^8. - _Zhi-Wei Sun_, Oct 04 2020
%H Zhi-Wei Sun, <a href="/A300666/b300666.txt">Table of n, a(n) for n = 0..10000</a>
%H Yue-Feng She and Hai-Liang Wu, <a href="https://arxiv.org/abs/2010.02067">Proof of a conjecture of Sun on sums of four squares</a>, arXiv:2010.02067 [math.NT], 2020.
%H Yue-Feng She and Hai-Liang Wu, <a href="https://doi.org/10.1017/S0004972720001501">Sums of four squares with a certain restriction</a>, Bull. of the Australian Math. Soc. (2021) First View, 1-10.
%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(8) = 1 since 8 = 0^2 + 0^2 + 2^2 + 2^2 with 0 = 0^2 and 0 + 3*0 = 0^2.
%e a(23) = 1 since 23 = 3^2 + 2^2 + 1^2 + 3^2 with 2*2 = 2^2 and 3 + 3*2 = 3^2.
%e a(56) = 1 since 56 = 4^2 + 0^2 + 2^2 + 6^2 with 4 = 2^2 and 4 + 3*0 = 2^2.
%e a(140) = 1 since 140 = 10^2 + 2^2 + 0^2 + 6^2 with 2*2 = 2^2 and 10 + 3*2 = 4^2.
%e a(472) = 1 since 472 = 0^2 + 12^2 + 2^2 + 18^2 with 0 = 0^2 and 0 + 3*12 = 6^2.
%e a(959) = 1 since 959 = 9^2 + 9^2 + 11^2 + 26^2 with 9 = 3^2 and 9 + 3*9 = 6^2.
%e a(1839) = 1 since 1839 = 1^2 + 5^2 + 7^2 + 42^2 with 1 = 1^2 and 1 + 3*5 = 4^2.
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t tab={};Do[r=0;Do[If[(SQ[m^2-3y]||SQ[2y])&&SQ[n-(m^2-3y)^2-y^2-z^2],r=r+1],{m,0,(10n)^(1/4)},{y,0,Min[m^2/3,Sqrt[n]]},{z,0,Sqrt[Max[0,(n-(m^2-3y)^2-y^2)/2]]}];tab=Append[tab,r],{n,0,80}];Print[tab]
%Y Cf. A000118, A000290, A271518, A281976, A300667, A300708, A300712.
%K nonn
%O 0,2
%A _Zhi-Wei Sun_, Mar 10 2018