A273108 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x + y)^2 + (4z)^2 a square, where x,y,z,w are nonnegative integers with x <= y > z.
1, 2, 1, 1, 3, 3, 1, 2, 3, 5, 3, 1, 3, 4, 1, 1, 5, 4, 3, 3, 3, 4, 1, 3, 5, 9, 4, 1, 6, 5, 3, 2, 5, 7, 6, 3, 3, 7, 1, 5, 9, 5, 3, 3, 6, 5, 1, 1, 6, 10, 6, 3, 6, 9, 3, 4, 4, 5, 8, 1, 6, 8, 2, 1, 10, 10, 2, 5, 6, 6, 2, 4, 6, 11, 7, 3, 6, 5, 2, 3
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 0 < 1 > 0 and (0+1)^2 + (4*0)^2 = 1^2. a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 = 1 > 0 and (1+1)^2 + (4*0)^2 = 2^2. a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1 < 2 > 1 and (1+2)^2 + (4*1)^2 = 5^2. a(15) = 1 since 15 = 1^2 + 2^2 + 1^2 + 3^2 with 1 < 2 > 1 and (1+2)^2 + (4*1)^2 = 5^2. a(23) = 1 since 23 = 3^2 + 3^2 + 2^2 + 1^2 with 3 = 3 > 2 and (3+3)^2 + (4*2)^2 = 10^2. a(39) = 1 since 39 = 1^2 + 5^2 + 2^2 + 3^2 with 1 < 5 > 2 and (1+5)^2 + (4*2)^2 = 10^2. a(47) = 1 since 47 = 3^2 + 3^2 + 2^2 + 5^2 with 3 = 3 > 2 and (3+3)^2 + (4*2)^2 = 10^2. a(95) = 1 since 95 = 3^2 + 7^2 + 6^2 + 1^2 with 3 < 7 > 6 and (3+7)^2 + (4*6)^2 = 26^2. a(135) = 1 since 135 = 3^2 + 6^2 + 3^2 + 9^2 with 3 < 6 > 3 and (3+6)^2 + (4*3)^2 = 15^2. a(183) = 1 since 183 = 2^2 + 7^2 + 3^2 + 11^2 with 2 < 7 > 3 and (2+7)^2 + (4*3)^2 = 15^2. a(543) = 1 since 543 = 2^2 + 13^2 + 9^2 + 17^2 with 2 < 13 > 9 and (2+13)^2 + (4*9)^2 = 39^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[(x+y)^2+16*z^2],r=r+1],{x,0,Sqrt[n/2]},{y,x,Sqrt[n-x^2]},{z,0,Min[y-1,Sqrt[n-x^2-y^2]]}];Print[n," ",r];Continue,{n,1,80}]
Extensions
All statements in examples checked by Rick L. Shepherd, May 29 2016
Comments