A271644 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 such that w*x + 2*x*y + 2*y*z is a square, where w is a positive integer and x,y,z are nonnegative integers.
1, 3, 1, 1, 4, 4, 1, 3, 4, 4, 2, 2, 5, 2, 1, 1, 8, 8, 2, 5, 7, 3, 2, 4, 8, 7, 3, 2, 6, 4, 4, 3, 7, 6, 2, 4, 6, 4, 3, 4, 9, 4, 3, 4, 8, 4, 1, 2, 5, 7, 4, 7, 10, 11, 3, 2, 5, 5, 2, 2, 7, 4, 2, 1, 8, 9, 2, 8, 14, 9, 1, 8, 8, 6, 5, 4, 8, 2, 3, 5
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1*0 + 2*0*0 + 2*0*0 = 0^2. a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1*1 + 2*1*0 + 2*0*1 = 1^2. a(7) = 1 since 7 = 1^2 + 1^2 + 2^2 + 1^2 with 1*1 + 2*1*2 + 2*2*1 = 3^2. a(11) = 2 since 11 = 1^2 + 1^2 + 0^2 + 3^2 with 1*1 + 2*1*0 + 2*0*3 = 1^2, and 11 = 1^2 + 3^2 + 1^2 + 0^2 with 1*3 + 2*3*1 + 2*1*0 = 3^2. a(12) = 2 since 12 = 1^2 + 1^2 + 1^2 + 3^2 with 1*1 + 2*1*1 + 2*1*3 = 3^2, and 12 = 2^2 + 2^2 + 0^2 + 2^2 with 2*2 + 2*2*0 + 2*0*2 = 2^2. a(15) = 1 since 15 = 3^2 + 1^2 + 1^2 + 2^2 with 3*1 + 2*1*1 + 2*1*2 = 3^2. a(47) = 1 since 47 = 1^2 + 1^2 + 6^2 + 3^2 with 1*1 + 2*1*6 + 2*6*3 = 7^2. a(71) = 1 since 71 = 3^2 + 3^2 + 2^2 + 7^2 with 3*3 + 2*3*2 + 2*2*7 = 7^2. a(379) = 1 since 379 = 3^2 + 3^2 + 0^2 + 19^2 with 3*3 + 2*3*0 + 2*0*19 = 3^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 [math.GM], 2016.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-w^2-x^2-y^2]&&SQ[w*x+2*x*y+2*y*Sqrt[n-w^2-x^2-y^2]],r=r+1],{w,1,Sqrt[n]},{x,0,Sqrt[n-w^2]},{y,0,Sqrt[n-w^2-x^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments