A271778 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and x^2 + 3*y^2 + 5*z^2 - 8*w^2 a square.
1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 4, 2, 4, 1, 2, 3, 4, 2, 3, 2, 3, 2, 2, 4, 4, 4, 5, 1, 2, 4, 1, 1, 5, 4, 6, 3, 2, 4, 2, 2, 3, 3, 6, 5, 3, 1, 4, 5, 4, 4, 4, 1, 6, 7, 4, 4, 1, 3, 4, 6, 5, 5, 2, 1, 8, 7, 6, 7, 3
Offset: 0
Keywords
Examples
a(2) = 1 since 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1^2 + 3*1^2 + 5*0^2 - 8*0^2 = 2^2. a(15) = 1 since 15 = 1^2 + 3^2 + 1^2 + 2^2 with 1^2 + 3*3^2 + 5*1^2 - 8*2^2 = 1^2. a(29) = 1 since 29 = 3^2 + 4^2 + 0^2 + 2^2 with 3^2 + 3*4^2 + 5*0^2 - 8*2^2 = 5^2. a(33) = 1 since 33 = 2^2 + 4^2 + 2^2 + 3^2 with 2^2 + 3*4^2 + 5*2^2 - 8*3^2 = 0. a(47) = 1 since 47 = 5^2 + 3^2 + 2^2 + 3^2 with 5^2 + 3*3^2 + 5*2^2 - 8*3^2 = 0^2. a(53) = 1 since 53 = 3^2 + 2^2 + 6^2 + 2^2 with 3^2 + 3*2^2 + 5*6^2 - 8*2^2 = 13^2. a(58) = 1 since 58 = 4^2 + 1^2 + 5^2 + 4^2 with 4^2 + 3*1^2 + 5*5^2 - 8*4^2 = 4^2. a(65) = 1 since 65 = 3^2 + 6^2 + 2^2 + 4^2 with 3^2 + 3*6^2 + 5*2^2 - 8*4^2 = 3^2. a(89) = 1 since 89 = 6^2 + 4^2 + 6^2 + 1^2 with 6^2 + 3*4^2 + 5*6^2 - 8*1^2 = 16^2. a(129) = 1 since 129 = 9^2 + 4^2 + 4^2 + 4^2 with 9^2 + 3*4^2 + 5*4^2 - 8*4^2 = 9^2. a(689) = 1 since 689 = 11^2 + 18^2 + 10^2 + 12^2 with 11^2 + 3*18^2 + 5*10^2 - 8*12^2 = 21^2. a(1553) = 1 since 1553 = 21^2 + 6^2 + 26^2 + 20^2 with 21^2 + 3*6^2 + 5*26^2 - 8*20^2 = 27^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..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^2+3*y^2+5*z^2-8*(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];Continue,{n,0,70}]
Comments