login
Number of ways to write n as x^2 + y^2 + z^2 + w^2 with (3*x)^2 + (4*y)^2 + (12*z)^2 a square , where w is a positive integer and x,y,z are nonnegative integers such that z or 2*z or 3*z is a square.
5

%I #18 Mar 16 2018 06:56:22

%S 1,3,1,2,6,1,2,3,2,7,2,2,7,1,5,2,7,9,3,6,2,3,4,1,9,7,3,4,5,7,2,3,5,6,

%T 3,4,7,3,8,6,7,6,4,3,7,3,2,2,4,13,5,8,6,5,3,1,8,8,3,6,5,1,11,2,16,5,4,

%U 8,1,8,2,7,11,7,5,4,2,13,2,6

%N Number of ways to write n as x^2 + y^2 + z^2 + w^2 with (3*x)^2 + (4*y)^2 + (12*z)^2 a square , where w is a positive integer and x,y,z are nonnegative integers such that z or 2*z or 3*z is a square.

%C Conjecture 1: a(n) > 0 for all n > 0. Moreover, any positive integer can be written as x^2 + y^2 + z^2 + w^2 with (3*x)^2 + (4*y)^2 + (12*z)^2 a square, where w is a positive integer and x,y,z are nonnegative integers for which one of z, z/2, z/3 is a square and z/2 (or z/3) is a power of 4 (including 1).

%C Conjecture 2: Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with (3*x)^2 + (4*y)^2 + (12*z)^2 a square, where x,y,z,w are nonnegative integers for which x or z is a square or y = 2^k for some k = 0,1,2,....

%C Conjecture 3. Let a,b,c be positive integers with a <= b <= c and gcd(a,b,c) = 1. If 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 (a*x)^2 + (b*y)^2 + (c*z)^2 is a square, then (a,b,c) must be among the three triples (3,4,12), (12,15,20) and (12,21,28).

%C We have verified Conjectures 1 and 2 for n up to 5*10^5 and 10^6 respectively.

%C See also A300791 and A300844 for similar conjectures.

%H Zhi-Wei Sun, <a href="/A300908/b300908.txt">Table of n, a(n) for n = 1..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(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 0 = 0^2 and (3*1)^2 + (4*1)^2 + (12*0)^2 = 5^2.

%e a(14) = 1 since 14 = 3^2 + 0^2 + 1^2 + 2^2 with 1 = 1^2 and (3*3)^2 + (4*0)^2 + (12*1)^2 = 15^2.

%e a(69) = 1 since 69 = 0^2 + 8^2 + 2^2 + 1^2 with 2*2 = 2^2 and (3*0)^2 + (4*8)^2 + (12*2)^2 = 40^2.

%e a(671) = 1 since 671 = 18^2 + 17^2 + 3^2 + 7^2 with 3*3 = 3^2 and (3*18)^2 + (4*17)^2 + (12*3)^2 = 94^2.

%e a(1175) = 1 since 1175 = 30^2 + 5^2 + 9^2 + 13^2 with 9 = 3^2 and (3*30)^2 + (4*5)^2 + (12*9)^2 = 142^2.

%e a(12151) = 1 since 12151 = 50^2 + 71^2 + 49^2 + 47^2 with 49 = 7^2 and (3*50)^2 + (4*71)^2 + (12*49)^2 = 670^2.

%e a(16204) = 1 since 16204 = 90^2 + 90^2 + 0^2 + 2^2 with 0 = 0^2 and (3*90)^2 + (4*90)^2 + (12*0)^2 = 450^2.

%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];

%t tab={};Do[r=0;Do[If[SQ[z]||SQ[2z]||SQ[3z], Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(3x)^2+(4y)^2+(12z)^2],r=r+1],{x,0,Sqrt[n-1-z^2]},{y,0,Sqrt[n-1-x^2-z^2]}]],{z,0,Sqrt[n-1]}];tab=Append[tab,r],{n,1,80}];Print[tab]

%Y Cf. A000118, A000290, A271510, A271513, A271518, A281976, A300666, A300667, A300708, A300712, A300751, A300752, A300791, A300792, A300844.

%K nonn

%O 1,2

%A _Zhi-Wei Sun_, Mar 15 2018