A273110 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x+4*y+4*z)^2 + (9*x+3*y+3*z)^2 a square, where x,y,z,w are nonnegative integers with y > 0 and y >= z <= w.
1, 2, 2, 1, 2, 3, 1, 2, 3, 3, 3, 2, 2, 2, 2, 1, 5, 6, 2, 2, 2, 3, 1, 3, 3, 4, 6, 1, 4, 4, 1, 2, 6, 5, 3, 3, 2, 5, 1, 3, 6, 5, 4, 3, 4, 3, 1, 2, 4, 7, 7, 2, 4, 8, 1, 2, 6, 3, 4, 2, 4, 5, 4, 1, 7, 8, 4, 5, 4, 4, 1, 6, 5, 7, 5, 2, 4, 5, 1, 2
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 1 > 0 = 0 and (0+4*1+4*0)^2 + (9*0+3*1+3*0)^2 = 5^2. a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 0 < 1 = 1 = 1 and (2+4*1+4*1)^2 + (9*2+3*1+3*1)^2 = 26^2. a(23) = 1 since 23 = 3^2 + 2^2 + 1^2 + 3^2 with 2 > 1 < 3 and (3+4*2+4*1)^2 + (9*3+3*2+3*1)^2 = 39^2. a(31) = 1 since 31 = 2^2 + 1^2 + 1^2 + 5^2 with 0 < 1 = 1 < 5 and (2+4*1+4*1)^2 + (9*2+3*1+3*1)^2 = 26^2. a(39) = 1 since 39 = 3^2 + 2^2 + 1^2 + 5^2 with 2 > 1 < 5 and (3+4*2+4*1)^2 + (9*3+3*2+3*1)^2 = 39^2. a(47) = 1 since 47 = 5^2 + 3^2 + 2^2 + 3^2 with 3 > 2 < 3 and (5+4*3+4*2)^2 + (9*5+3*3+3*2)^2 = 65^2. a(55) = 1 since 55 = 2^2 + 1^2 + 1^2 + 7^2 with 0 < 1 = 1 < 7 and (2+4*1+4*1)^2 + (9*2+3*1+3*1)^2 = 26^2. a(71) = 1 since 71 = 6^2 + 5^2 + 1^2 + 3^2 with 5 > 1 < 3 and (6+4*5+4*1)^2 + (9*6+3*5+3*1)^2 = 78^2. a(79) = 1 since 79 = 6^2 + 3^2 + 3^2 + 5^2 with 0 < 3 = 3 < 5 and (6+4*3+4*3)^2 + (9*6+3*3+3*3)^2 = 78^2. a(119) = 1 since 119 = 5^2 + 3^2 + 2^2 + 9^2 with 3 > 2 < 9 and (5+4*3+4*2)^2 + (9*5+3*3+3*2)^2 = 65^2. a(151) = 1 since 151 = 9^2 + 6^2 + 3^2 + 5^2 with 6 > 3 < 5 and (9+4*6+4*3)^2 + (9*9+3*6+3*3)^2 = 117^2. a(191) = 1 since 191 = 10^2 + 9^2 + 1^2 + 3^2 with 9 > 1 < 3 and (10+4*9+4*1)^2 + (9*10+3*9+3*1)^2 = 130^2. a(311) = 1 since 311 = 7^2 + 6^2 + 1^2 + 15^2 with 6 > 1 < 15 and (7+4*6+4*1)^2 + (9*7+3*6+3*1)^2 = 91^2. a(671) = 1 since 671 = 17^2 + 11^2 + 6^2 + 15^2 with 11 > 6 < 15 and (17+4*11+4*6)^2 + (9*17+3*11+3*6)^2 = 221^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.
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+4y+4z)^2+(9x+3y+3z)^2],r=r+1],{x,0,Sqrt[n]},{z,0,Sqrt[(n-x^2)/3]},{y,Max[1,z],Sqrt[n-x^2-2z^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments