%I #10 Oct 04 2020 23:43:26
%S 1,2,3,2,2,3,3,2,1,3,4,2,1,2,2,2,2,3,5,2,3,3,2,1,1,5,6,5,2,3,5,3,3,4,
%T 7,3,5,4,3,3,2,8,8,4,1,6,4,1,2,3,9,7,6,3,5,4,1,6,5,3,2,5,3,3,2,5,11,4,
%U 3,4,5,1,2,5,5,6,3,5,4,2,3
%N Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that x or y is a square and x - y is also a square.
%C Conjecture: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 16^k*m with k = 0,1,2,... and m = 0, 8, 12, 23, 24, 44, 47, 56, 71, 79, 92, 95, 140, 168, 184, 248, 344, 428, 568, 632, 1144, 1544.
%C By the author's 2017 JNT paper, each nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x - y (or x) is a square.
%C See also A281976, A300666, A300667 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="/A300708/b300708.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(71) = 1 since 71 = 5^2 + 1^2 + 3^2 + 6^2 with 1 = 1^2 and 5 - 1 = 2^2.
%e a(95) = 1 since 95 = 2^2 + 1^2 + 3^2 + 9^2 with 1 = 1^2 and 2 - 1 = 1^2.
%e a(344) = 1 since 344 = 4^2 + 0^2 + 2^2 + 18^2 with 4 = 2^2 and 4 - 0 = 2^2.
%e a(428) = 1 since 428 = 13^2 + 9^2 + 3^2 + 13^2 with 9 = 3^2 and 13 - 9 = 2^2.
%e a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 = 4^2 and 16 - 12 = 2^2.
%e a(1144) = 1 since 1144 = 20^2 + 16^2 + 2^2 + 22^2 with 16 = 4^2 and 20 - 16 = 2^2.
%e a(1544) = 1 since 1544 = 0^2 + 0^2 + 10^2 + 38^2 with 0 = 0^2 and 0 - 0 = 0^2.
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t tab={};Do[r=0;Do[If[(SQ[m^2+y]||SQ[y])&&SQ[n-(m^2+y)^2-y^2-z^2],r=r+1],{m,0,n^(1/4)},{y,0,Sqrt[(n-m^4)/2]},{z,0,Sqrt[Max[0,(n-(m^2+y)^2-y^2)/2]]}];tab=Append[tab,r],{n,0,80}];Print[tab]
%Y Cf. A000118, A000290, A271518, A271775, A281976, A300666, A300667, A300712.
%K nonn
%O 0,2
%A _Zhi-Wei Sun_, Mar 11 2018