A279522 Number of ways to write n as w^2 + x^2 + y^2 + z^2 with w + 2*x + 3*y + 5*z a square, where w,x,y,z are nonnegative integers.
1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 1, 1, 2, 2, 2, 1, 3, 5, 2, 2, 5, 4, 1, 1, 2, 4, 1, 0, 7, 3, 1, 1, 1, 4, 6, 4, 5, 4, 4, 3, 3, 5, 2, 3, 5, 4, 2, 1, 4, 8, 5, 1, 5, 12, 1, 1, 2, 6, 3, 4, 3, 3, 9, 1, 6, 4, 2, 3, 8, 8, 2, 3, 7, 7, 7, 3, 8, 14, 3, 2
Offset: 0
Keywords
Examples
a(27) = 1 since 27 = 1^2 + 5^2 + 0^2 + 1^2 with 1 + 2*5 + 3*0 + 5*1 = 4^2. a(31) = 1 since 31 = 1^2 + 2^2 + 5^2 + 1^2 with 1 + 2*2 + 3*5 + 5*1 = 5^2. a(33) = 1 since 33 = 0^2 + 4^2 + 4^2 + 1^2 with 0 + 2*4 + 3*4 + 5*1 = 5^2. a(52) = 1 since 52 = 4^2 + 6^2 + 0^2 + 0^2 with 4 + 2*6 + 3*0 + 5*0 = 4^2. a(55) = 1 since 55 = 1^2 + 5^2 + 5^2 + 2^2 with 1 + 2*5 + 3*5 + 5*2 = 6^2. a(56) = 1 since 56 = 0^2 + 4^2 + 6^2 + 2^2 with 0 + 2*4 + 3*6 + 5*2 = 6^2. a(88) = 1 since 88 = 4^2 + 8^2 + 2^2 + 2^2 with 4 + 2*8 + 3*2 + 5*2 = 6^2. a(137) = 1 since 137 = 10^2 + 6^2 + 1^2 + 0^2 with 10 + 2*6 + 3*1 + 5*0 = 5^2. a(164) = 1 since 164 = 12^2 + 2^2 + 0^2 + 4^2 with 12 + 2*2 + 3*0 + 5*4 = 6^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..5000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.NT], 2016.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[Sqrt[n-x^2-y^2-z^2]+2x+3y+5z],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,0,80}]
Comments