A272084 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 4*x^2 + 5*y^2 + 20*z*w a square, where x,y,z,w are nonnegative integers with z < w.
1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 3, 1, 2, 1, 2, 1, 3, 3, 2, 2, 1, 2, 3, 1, 3, 4, 4, 1, 4, 1, 2, 1, 3, 3, 3, 2, 2, 1, 2, 3, 5, 4, 2, 3, 3, 3, 2, 1, 2, 6, 6, 2, 3, 2, 2, 1, 3, 4, 4, 2, 3, 1, 6, 1, 5, 3, 4, 3, 4, 1, 4, 3, 4, 8, 4, 2, 1, 3, 2, 2, 5, 4, 4, 1, 6, 3, 6, 2, 5, 6, 7, 3, 2, 2, 2, 1, 3, 5, 9, 3
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 < 1 and 4*0^2 + 5*0^2 + 20*0*1 = 0^2. a(2) = 1 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 0 < 1 and 4*1^2 + 5*0^2 + 20*0*1 = 2^2. a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 0 < 1 and 4*1^2 + 5*1^2 + 20*0*1 = 3^2. a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 0 < 2 and 4*1^2 + 5*1^2 + 20*0*2 = 3^2. a(14) = 1 since 14 = 1^2 + 3^2 + 0^2 + 2^2 with 0 < 2 and 4*1^2 + 5*3^2 + 20*0*2 = 7^2. a(21) = 1 since 21 = 0^2 + 2^2 + 1^2 + 4^2 with 1 < 4 and 4*0^2 + 5*2^2 + 20*1*4 = 10^2. a(30) = 1 since 30 = 4^2 + 2^2 + 1^2 + 3^2 with 1 < 3 and 4*4^2 + 5*2^2 + 20*1*3 = 12^2. a(38) = 1 since 38 = 1^2 + 1^2 + 0^2 + 6^2 with 0 < 6 and 4*1^2 + 5*1^2 + 20*0*6 = 3^2. a(62) = 1 since 62 = 1^2 + 3^2 + 4^2 + 6^2 with 4 < 6 and 4*1^2 + 5*3^2 + 20*4*6 = 23^2. a(70) = 1 since 70 = 7^2 + 1^2 + 2^2 + 4^2 with 2 < 4 and 4*7^2 + 5*1^2 + 20*2*4 = 19^2. a(77) = 1 since 77 = 4^2 + 6^2 + 3^2 + 4^2 with 3 < 4 and 4*4^2 + 5*6^2 + 20*3*4 = 22^2. a(142) = 1 since 142 = 4^2 + 6^2 + 3^2 + 9^2 with 3 < 9 and 4*4^2 + 5*6^2 + 20*3*9 = 28^2. a(217) = 1 since 217 = 6^2 + 6^2 + 8^2 + 9^2 with 8 < 9 and 4*6^2 + 5*6^2 + 20*8*9 = 42^2. a(237) = 1 since 237 = 5^2 + 8^2 + 2^2 + 12^2 with 2 < 12 and 4*5^2 + 5*8^2 + 20*2*12 = 30^2. a(302) = 1 since 302 = 11^2 + 9^2 + 6^2 + 8^2 with 6 < 8 and 4*11^2 + 5*9^2 + 20*6*8 = 43^2. a(382) = 1 since 382 = 11^2 + 7^2 + 4^2 + 14^2 with 4 < 14 and 4*11^2 + 5*4^2 + 20*4*14 = 43^2. a(406) = 1 since 406 = 8^2 + 6^2 + 9^2 + 15^2 with 9 < 15 and 4*8^2 + 5*6^2 + 20*9*15 = 56^2. a(453) = 1 since 453 = 8^2 + 14^2 + 7^2 + 12^2 with 7 < 12 and 4*8^2 + 5*14^2 + 20*7*12 = 54^2. a(670) = 1 since 670 = 17^2 + 11^2 + 2^2 + 16^2 with 2 < 16 and 4*17^2 + 5*11^2 + 20*2*16 = 49^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[4x^2+5y^2+20*z*Sqrt[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)/2]}];Print[n," ",r];Continue,{n,1,100}]
Comments