A281659 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with 9*x^2 + 16*y^2 + 24*z^2 + 48*w^2 a square, where x,y,z,w are nonnegative integers.
1, 2, 2, 2, 2, 1, 4, 1, 2, 3, 4, 1, 5, 1, 5, 1, 2, 2, 8, 1, 2, 5, 2, 2, 4, 3, 2, 8, 1, 5, 4, 2, 2, 3, 3, 4, 4, 3, 2, 2, 4, 2, 6, 1, 1, 3, 2, 3, 5, 2, 3, 7, 3, 1, 7, 1, 5, 2, 2, 4, 1, 1, 6, 7, 2, 1, 7, 2, 4, 5, 6, 0, 8, 3, 6, 8, 5, 3, 4, 2, 2
Offset: 0
Keywords
Examples
a(11) = 1 since 11 = 3^2 + 1^2 + 1^2 + 0^2 with 9*3^2 + 16*1^2 + 24*1^2 + 48*0 = 11^2. a(170) = 1 since 170 = 3^2 + 6^2 + 2^2 + 11^2 with 9*3^2 + 16*6^2 + 24*2^2 + 48*11^2 = 81^2. a(305) = 1 since 305 = 0^2 + 15^2 + 4^2 + 8^2 with 9*0^2 + 16*15^2 + 24*4^2 + 48*8^2 = 84^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.
- Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[9x^2+16y^2+24z^2+48*(n-x^2-y^2-z^2)],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Label[aa];Continue,{n,0,80}]
Comments