A271513 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with 3*x^2 + 4*y^2 + 9*z^2 a square, where w, x, y and z are nonnegative integers.
1, 3, 2, 1, 4, 6, 3, 2, 2, 5, 6, 1, 2, 5, 4, 2, 4, 4, 3, 2, 6, 5, 1, 1, 3, 8, 6, 2, 4, 6, 6, 4, 2, 3, 8, 3, 7, 7, 1, 6, 6, 8, 6, 1, 2, 11, 7, 1, 2, 12, 8, 2, 7, 5, 9, 4, 4, 4, 7, 2, 4, 9, 4, 7, 4, 11, 6, 1, 5, 8, 7
Offset: 0
Keywords
Examples
a(3) = 1 since 3 = 0^2 + 1^2 + 1^2 + 1^2 with 3*1^2 + 4*1^2 + 9*1^2 = 4^2. a(11) = 1 since 11 = 1^2 + 3^2 + 0^2 + 1^2 with 3*3^2 + 4*0^2 + 9*1^2 = 6^2. a(22) = 1 since 22 = 4^2 + 2^2 + 1^2 + 1^2 with 3*2^2 + 4*1^2 + 9*1^2 = 5^2. a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 3*1^2 + 4*2^2 + 9*3^2 = 10^2. a(38) = 1 since 38 = 0^2 + 6^2 + 1^2 + 1^2 with 3*6^2 + 4*1^2 + 9*1^2 = 11^2. a(43) = 1 since 43 = 4^2 + 3^2 + 3^2 + 3^2 with 3*3^2 + 4*3^2 + 9*3^2 = 12^2. a(47) = 1 since 47 = 3^2 + 6^2 + 1^2 + 1^2 with 3*6^2 + 4*1^2 + 9*1^2 = 11^2. a(67) = 1 since 67 = 8^2 + 1^2 + 1^2 + 1^2 with 3*1^2 + 4*1^2 + 9*1^2 = 4^2. a(83) = 1 since 83 = 0^2 + 9^2 + 1^2 + 1^2 with 3*9^2 + 4*1^2 + 9*1^2 = 16^2. a(107) = 1 since 107 = 9^2 + 3^2 + 4^2 + 1^2 with 3*3^2 + 4*4^2 + 9*1^2 = 10^2. a(155) = 1 since 155 = 0^2 + 9^2 + 5^2 + 7^2 with 3*9^2 + 4*5^2 + 9*7^2 = 28^2. a(323) = 1 since 323 = 3^2 + 15^2 + 8^2 + 5^2 with 3*15^2 + 4*8^2 + 9*5^2 = 34^2. a(683) = 1 since 683 = 15^2 + 11^2 + 16^2 + 9^2 with 3*11^2 + 4*16^2 + 9*9^2 = 46^2. a(803) = 1 since 803 = 24^2 + 13^2 + 7^2 + 3^2 with 3*13^2 + 4*7^2 + 9*3^2 = 28^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190. Also available from arXiv:1604.06723 [math.NT], 2016-2017.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[3x^2+4y^2+9z^2],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,0,70}]
Comments