A271510 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x >= y >= 0, z >= 0 and w >= 0 such that x^2 + 8*y^2 + 16*z^2 is a square.
1, 3, 3, 2, 4, 4, 1, 1, 3, 4, 5, 2, 3, 5, 2, 1, 4, 5, 5, 3, 4, 2, 2, 1, 1, 8, 5, 4, 4, 4, 2, 2, 3, 3, 7, 2, 6, 7, 3, 3, 5, 6, 4, 6, 2, 4, 4, 1, 3, 6, 9, 4, 8, 5, 6, 2, 2, 6, 10, 4, 1, 5, 3, 7, 4, 10, 3, 5, 5, 2, 4, 1, 5, 6, 7, 2, 6, 1, 7, 4, 4
Offset: 0
Keywords
Examples
a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 1 = 1 and 1^2 + 8*1^2 + 16*0^2 = 3^2. a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 = 1 and 1^2 + 8*1^2 + 16*1^2 = 5^2. a(15) = 1 since 15 = 3^2 + 1^2 + 2^2 + 1^2 with 3 > 1 and 3^2 + 8*1^2 + 16*2^2 = 9^2. a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 3 > 1 and 3^2 + 8*1^2 + 16*2^2 = 9^2. a(47) = 1 since 47 = 3^2 + 2^2 + 5^2 + 3^2 with 3 > 2 and 3^2 + 8*2^2 + 16*5^2 = 21^2. a(71) = 1 since 71 = 7^2 + 2^2 + 3^2 + 3^2 with 7 > 2 and 7^2 + 8*2^2 + 16*3^2 = 15^2. a(77) = 1 since 77 = 5^2 + 4^2 + 6^2 + 0^2 with 5 > 4 and 5^2 + 8*4^2 + 16*6^2 = 27^2. a(105) = 1 since 105 = 6^2 + 2^2 + 4^2 + 7^2 with 6 > 2 and 6^2 + 8*2^2 + 16*4^2 = 18^2. a(138) = 1 since 138 = 3^2 + 2^2 + 5^2 + 10^2 with 3 > 2 and 3^2 + 8*2^2 + 16*5^2 = 21^2. a(191) = 1 since 191 = 9^2 + 3^2 + 1^2 + 10^2 with 9 > 3 and 9^2 + 8*3^2 + 16*1^2 = 13^2. a(215) = 1 since 215 = 11^2 + 7^2 + 6^2 + 3^2 with 11 > 7 and 11^2 + 8*7^2 + 16*6^2 = 33^2. a(311) = 1 since 311 = 15^2 + 6^2 + 1^2 + 7^2 with 15 > 6 and 15^2 + 8*6^2 + 16*1^2 = 23^2. a(335) = 1 since 335 = 17^2 + 1^2 + 3^2 + 6^2 with 17 > 1 and 17^2 + 8*1^2 + 16*3^2 = 21^2. a(2903) = 1 since 2903 = 49^2 + 14^2 + 15^2 + 9^2 with 49 > 14 and 49^2 + 8*14^2 + 16*15^2 = 87^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190. Also available from arXiv:1604.06723 [math.NT], 2016-2017.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x^2+8y^2+16z^2],r=r+1],{y,0,Sqrt[n/2]},{x,y,Sqrt[n-y^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,0,80}]
Comments