A271824 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x+2*y)^2 + 8*z^2 + 40*w^2 a square, where x is a positive integer and y,z,w are nonnegative integers.
1, 2, 2, 1, 2, 2, 2, 2, 1, 4, 1, 3, 3, 2, 1, 1, 3, 6, 3, 3, 4, 1, 1, 2, 3, 4, 3, 3, 2, 5, 4, 2, 1, 3, 3, 3, 5, 1, 5, 4, 2, 6, 3, 2, 5, 3, 3, 3, 2, 8, 3, 6, 6, 4, 4, 2, 4, 6, 3, 3, 5, 3, 4, 1, 5, 5, 4, 4, 2, 6, 1, 6, 2, 4, 7, 4, 3, 5, 7, 3
Offset: 1
Keywords
Examples
a(9) = 1 since 9 = 3^2 + 0^2 + 0^2 + 0^2 with (3+2*0)^2 + 8*0^2 + 40*02 = 3^2. a(11) = 1 since 11 = 1^2 + 1^2 + 3^2 + 0^2 with (1+2*1)^2 + 8*3^2 + 40*0^2 = 9^2. a(15) = 1 since 15 = 1^2 + 3^2 + 2^2 + 1^2 with (1+2*3)^2 + 8*2^2 + 40*1^2 = 11^2. a(22) = 1 since 22 = 3^2 + 2^2 + 3^2 + 0^2 with (3+2*2)^2 + 8*3^2 + 40*0^2 = 11^2. a(23) = 1 since 23 = 1^2 + 3^2 + 2^2 + 3^2 with (1+2*3)^2 + 8*2^2 + 40*3^2 = 21^2. a(33) = 1 since 33 = 4^2 + 1^2 + 0^2 + 4^2 with (4+2*1)^2 + 8*0^2 + 40*4^2 = 26^2. a(38) = 1 since 38 = 5^2 + 2^2 + 0^2 + 3^2 with (5+2*2)^2 + 8*0^2 + 40*3^2 = 21^2. a(71) = 1 since 71 = 1^2 + 6^2 + 5^2 + 3^2 since (1+2*6)^2 + 8*5^2 + 40*3^2 = 27^2. a(129) = 1 since 129 = 5^2 + 6^2 + 8^2 + 2^2 with (5+2*6)^2 + 8*8^2 + 40*2^2 = 31^2. a(167) = 1 since 167 = 11^2 + 1^2 + 3^2 + 6^2 with (11+2*1)^2 + 8*3^2 + 40*6^2 = 41^2. a(187) = 1 since 187 = 3^2 + 5^2 + 12^2 + 3^2 with (3+2*5)^2 + 8*12^2 + 40*3^2 = 41^2. a(278) = 1 since 278 = 3^2 + 0^2 + 10^2 + 13^2 with (3+2*0)^2 + 8*10^2 + 40*13^2 = 87^2. a(473) = 1 since 473 = 7^2 + 10^2 + 0^2 + 18^2 with (7+2*10)^2 + 8*0^2 + 40*18^2 = 117^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723, 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+2y)^2+8z^2+40(n-x^2-y^2-z^2)],r=r+1],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments