login
Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (8*x+12*y)^2 + (15*z)^2 a square, where x,y,z,w are nonnegative integers with x+y > 0 and z > 0.
15

%I #18 May 18 2016 23:24:38

%S 0,1,2,1,0,1,1,1,1,1,3,4,2,3,2,1,2,3,3,1,2,3,1,1,1,1,4,3,3,4,1,1,5,3,

%T 2,3,3,5,2,1,2,1,3,3,3,3,2,4,5,5,2,4,5,6,1,3,7,3,5,4,2,6,4,1,5,4,5,4,

%U 7,7,4,3,5,4,5,6,2,10,3,1

%N Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (8*x+12*y)^2 + (15*z)^2 a square, where x,y,z,w are nonnegative integers with x+y > 0 and z > 0.

%C Conjecture: a(n) > 0 for all n > 5, and a(n) = 1 only for n = 7, 9, 23, 25, 31, 55, 2^k*m (k = 1,2,... and m = 1, 5), 2^(2k+1)*m (k = 0,1,2,... and m = 3, 13, 21).

%C This conjecture implies that any integer n > 5 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 8*x+12*y and 15*z are the two legs of a right triangle with positive integer sides.

%C See also A271714, A273108, A273110 and A273134 for similar conjectures related to Pythagorean triples. For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

%H Zhi-Wei Sun, <a href="/A273107/b273107.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 [math.GM], 2016.

%e a(2) = 1 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 1 + 0 > 0 < 1 and (8*1+12*0)^2 + (15*1)^2 = 17^2.

%e a(4) = 1 since 4 = 1^2 + 1^2 + 1^2 + 1^2 with 1 + 1 > 0 < 1 and (8*1+12*1)^2 + (15*1)^2 = 25^2.

%e a(6) = 1 since 6 = 1^2 + 0^2 + 1^2 + 2^2 with 1 + 0 > 0 < 1 and (8*1+12*0)^2 + (15*1)^2 = 17^2.

%e a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 + 1 > 0 < 1 and (8*1+12*1)^2 + (15*1)^2 = 25^2.

%e a(9) = 1 since 9 = 2^2 + 0^2 + 2^2 + 1^2 with 2 + 0 > 0 < 2 and (8*2+12*0)^2 + (15*2)^2 = 34^2.

%e a(10) = 1 since 10 = 0^2 + 3^2 + 1^2 + 0^2 with 0 + 3 > 0 < 1 and (8*0+12*3)^2 + (15*1)^2 = 39^2.

%e a(20) = 1 since 20 = 3^2 + 1^2 + 1^2 + 3^2 with 3 + 1 > 0 < 1 and (8*3+12*1)^2 + (15*1)^2 = 39^2.

%e a(23) = 1 since 23 = 2^2 + 1^2 + 3^2 + 3^2 with 2 + 1 > 0 < 3 and (8*2+12*1)^2 + (15*3)^2 = 53^2.

%e a(25) = 1 since 25 = 1^2 + 2^2 + 4^2 + 2^2 with 1 + 2 > 0 < 4 and (8*1+12*2)^2 + (15*4)^2 = 68^2.

%e a(26) = 1 since 26 = 0^2 + 3^2 + 1^2 + 4^2 with 0 + 3 > 0 < 1 and (8*0+12*3)^2 + (15*1)^2 = 39^2.

%e a(31) = 1 since 31 = 3^2 + 3^2 + 3^2 + 2^2 with 3 + 3 > 0 < 3 and (8*3+12*3)^2 + (15*3)^2 = 75^2.

%e a(42) = 1 since 42 = 2^2 + 2^2 + 5^2 + 3^2 with 2 + 2 > 0 < 5 and (8*2+12*2)^2 + (15*5)^2 = 85^2.

%e a(55) = 1 since 55 = 6^2 + 1^2 + 3^2 + 3^2 with 6 + 1 > 0 < 3 and (8*6+12*1)^2 + (15*3)^2 = 75^2.

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

%t Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(8x+12y)^2+(15z)^2],r=r+1],{x,0,Sqrt[n-1]},{y,Max[0,1-x],Sqrt[n-1-x^2]},{z,1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]

%Y Cf. A000118, A000290, A260625, A261876, A262357, A267121, A268197, A268507, A269400, A270073, A271510, A271513, A271518, A271608, A271665, A271714, A271721, A271724, A271775, A271778, A271824, A272084, A272332, A272351, A272620, A272888, A272977, A273021, A273108, A273110, A273134.

%K nonn

%O 1,3

%A _Zhi-Wei Sun_, May 15 2016