A273021 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 2*x*y + y*z - z*w - w*x a square, where w is a positive integer and x,y,z are nonnegative integers with x <= y.
1, 1, 2, 2, 2, 3, 2, 1, 2, 2, 1, 3, 3, 4, 2, 2, 3, 5, 2, 2, 4, 1, 1, 3, 3, 4, 7, 4, 4, 1, 1, 1, 4, 4, 2, 4, 4, 6, 5, 2, 5, 7, 3, 3, 3, 4, 1, 3, 5, 4, 5, 6, 2, 8, 1, 4, 4, 4, 3, 2, 5, 5, 4, 2, 5, 7, 2, 3, 4, 5, 1, 5, 4, 5, 6, 5, 3, 4, 3, 2
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 = 0 and 2*0*0 + 0*0 - 0*1 - 1*0 = 0^2. a(2) = 1 since 2 = 0^2 + 1^2 + 0^2 + 1^2 with 0 < 1 and 2*0*1 + 1*0 - 0*1 - 1*0 = 0^2. a(11) = 1 since 11 = 0^2 + 1^2 + 3^2 + 1^2 with 0 < 1 and 2*0*1 + 1*3 - 3*1 - 1*0 = 0^2. a(22) = 1 since 22 = 0^2 + 3^2 + 2^2 + 3^2 with 0 < 3 and 2*0*3 + 3*2 - 2*3 - 3*0 = 0^2. a(23) = 1 since 23 = 2^2 + 3^2 + 3^2 + 1^2 with 2 < 3 and 2*2*3 + 3*3 - 3*1 - 1*2 = 4^2. a(30) = 1 since 30 = 1^2 + 3^2 + 2^2 + 4^2 with 1 < 3 and 2*1*3 + 3*2 - 2*4 - 4*1 = 0^2. a(31) = 1 since 31 = 3^2 + 3^2 + 2^2 + 3^2 with 3 = 3 and 2*3*3 + 3*2 - 2*3 -3*3 = 3^2. a(47) = 1 since 47 = 3^2 + 5^2 + 2^2 + 3^2 with 3 < 5 and 2*3*5 + 5*2 - 2*3 - 3*3 = 5^2. a(55) = 1 since 55 = 1^2 + 7^2 + 2^2 + 1^2 with 1 < 7 and 2*1*7 + 7*2 - 2*1 - 1*1 = 5^2. a(71) = 1 since 71 = 1^2 + 5^2 + 3^2 + 6^2 with 1 < 5 and 2*1*5 + 5*3 - 3*6 - 6*1 = 1^2. a(105) = 1 since 105 = 1^2 + 6^2 + 2^2 + 8^2 with 1 < 6 and 2*1*6 + 6*2 - 2*8 - 8*1 = 0^2. a(115) = 1 since 115 = 1^2 + 8^2 + 7^2 + 1^2 with 1 < 8 and 2*1*8 + 8*7 - 7*1 - 1*1 = 8^2. a(119) = 1 since 119 = 1^2 + 6^2 + 1^2 + 9^2 with 1 < 6 and 2*1*6 + 6*1 - 1*9 - 9*1 = 0^2. a(253) = 1 since 253 = 2^2 + 8^2 + 11^2 + 8^2 with 2 < 8 and 2*2*8 + 8*11 - 11*8 - 8*2 = 4^2. a(330) = 1 since 330 = 4^2 + 13^2 + 8^2 + 9^2 with 4 < 13 and 2*4*13 + 13*8 - 8*9 - 9*4 = 10^2. a(383) = 1 since 383 = 9^2 + 14^2 + 5^2 + 9^2 with 9 < 14 and 2*9*14 + 14*5 - 5*9 - 9*9 = 14^2. a(385) = 1 since 385 = 4^2 + 12^2 + 0^2 + 15^2 with 4 < 12 and 2*4*12 + 12*0 - 0*15 - 15*4 = 6^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
Crossrefs
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[y*(2x+z)-Sqrt[n-x^2-y^2-z^2]*(x+z)],r=r+1],{x,0,Sqrt[(n-1)/2]},{y,x,Sqrt[n-1-x^2]},{z,0,Sqrt[n-1-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments