A271665 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 such that w^2 + 4*x*y + 8*y*z + 32*z*x is a square, where w is a positive integer and x,y,z are nonnegative integers.
1, 3, 1, 1, 6, 3, 1, 3, 1, 6, 2, 1, 7, 10, 1, 1, 9, 3, 2, 6, 2, 2, 3, 3, 8, 10, 1, 1, 10, 2, 2, 3, 5, 8, 11, 1, 7, 13, 2, 6, 16, 6, 1, 2, 6, 2, 3, 1, 3, 16, 4, 7, 9, 3, 2, 10, 4, 9, 4, 1, 8, 15, 1, 1, 15, 5, 2, 9, 6, 8, 2, 3, 10, 13, 4, 2, 17, 7, 1, 6
Offset: 1
Keywords
Examples
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1^2 + 4*0*1 + 8*1*1 + 32*1*0 = 3^2. a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with 2^2 + 4*2*0 + 8*0*0 + 32*0*0 = 2^2. a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1^2 + 4*2*1 + 8*1*1 + 32*1*2 = 9^2. a(15) = 1 since 15 = 1^2 + 2^2 + 1^2 + 3^2 with 1^2 + 4*2*1 + 8*1*3 + 32*3*2 = 15^2. a(43) = 1 since 43 = 3^2 + 3^2 + 4^2 + 3^2 with 3^2 + 4*3*4 + 8*4*3 + 32*3*3 = 21^2. a(79) = 1 since 79 = 5^2 + 3^2 + 6^2 + 3^2 with 5^2 + 4*3*6 + 8*6*3 + 32*3*3 = 23^2. a(95) = 1 since 95 = 5^2 + 6^2 + 5^2 + 3^2 with 5^2 + 4*6*5 + 8*5*3 + 32*3*6 = 29^2. a(129) = 1 since 129 = 5^2 + 6^2 + 8^2 + 2^2 with 5^2 + 4*6*8 + 8*8*2 + 32*2*6 = 27^2. a(141) = 1 since 141 = 8^2 + 5^2 + 4^2 + 6^2 with 8^2 + 4*5*4 + 8*4*6 + 32*6*5 = 36^2. a(159) = 1 since 159 = 11^2 + 1^2 + 6^2 + 1^2 with 11^2 + 4*1*6 + 8*6*1 + 32*1*1 = 15^2. a(183) = 1 since 183 = 1^2 + 9^2 + 10^2 + 1^2 with 1^2 + 4*9*10 + 8*10*1 + 32*1*9 = 27^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.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[4x*y+8*y*z+32*z*x+(n-x^2-y^2-z^2)],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,0,Sqrt[n-1-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments