A279612 Number of ways to write n = x^2 + y^2 + z^2 + w^2 with x + 2*y - 2*z a power of 4 (including 4^0 = 1), where x,y,z,w are nonnegative integers.
1, 1, 1, 2, 3, 1, 1, 1, 3, 5, 2, 1, 3, 4, 1, 1, 3, 5, 5, 4, 3, 2, 3, 2, 4, 5, 1, 3, 4, 4, 1, 1, 5, 7, 7, 2, 3, 7, 3, 2, 4, 3, 4, 2, 8, 5, 1, 1, 6, 8, 3, 6, 7, 8, 2, 3, 3, 6, 8, 4, 6, 5, 2, 2, 9, 7, 7, 7, 7, 12, 3, 1, 9, 10, 7, 1, 10, 10, 2, 3
Offset: 1
Keywords
Examples
a(12) = 1 since 12 = 1^2 + 1^2 + 1^2 + 3^2 with 1 + 2*1 - 2*1 = 4^0. a(15) = 1 since 15 = 3^2 + 1^2 + 2^2 + 1^2 with 3 + 2*1 - 2*2 = 4^0. a(27) = 1 since 27 = 4^2 + 1^2 + 1^2 + 3^2 with 4 + 2*1 - 2*1 = 4. a(31) = 1 since 31 = 3^2 + 2^2 + 3^2 + 3^2 with 3 + 2*2 - 2*3 = 4^0. a(47) = 1 since 47 = 3^2 + 2^2 + 3^2 + 5^2 with 3 + 2*2 - 2*3 = 4^0. a(72) = 1 since 72 = 8^2 + 0^2 + 2^2 + 2^2 with 8 + 2*0 - 2*2 = 4. a(76) = 1 since 76 = 1^2 + 5^2 + 5^2 + 5^2 with 1 + 2*5 - 2*5 = 4^0. a(92) = 1 since 92 = 4^2 + 6^2 + 6^2 + 2^2 with 4 + 2*6 - 2*6 = 4. a(111) = 1 since 111 = 9^2 + 1^2 + 5^2 + 2^2 with 9 + 2*1 - 2*5 = 4^0. a(127) = 1 since 127 = 7^2 + 2^2 + 5^2 + 7^2 with 7 + 2*2 - 2*5 = 4^0.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..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].
- Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.
Crossrefs
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; FP[n_]:=FP[n]=n>0&&IntegerQ[Log[4,n]]; Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&FP[x+2y-2z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments