A275675 Number of ordered ways to write n as 4^k*(1+x^2+y^2)+5*z^2, where k,x,y,z are nonnegative integers with x <= y.
1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 3, 2, 2, 3, 2, 4, 1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 1, 3, 3, 2, 1, 2, 1, 5, 3, 2, 2, 3, 4, 1, 4, 2, 3, 5, 2, 2, 3, 1, 3, 3, 1, 4, 2, 4, 1, 2, 3, 2, 6, 2, 3, 3, 2, 2, 2, 2, 2, 3
Offset: 1
Keywords
Examples
a(43) = 1 since 43 = 4^0*(1+1^2+6^2) + 5*1^2. a(45) = 1 since 45 = 4*(1+0^2+3^2) + 5*1^2. a(237) = 1 since 237 = 4^3*(1+1^2+1^2) + 5*3^2. a(561) = 1 since 561 = 4*(1+8^2+8^2) + 5*3^2. a(9777) = 1 since 9777 = 4*(1+11^2+31^2) + 5*33^2. a(39108) = 1 since 39108 = 4^2*(1+11^2+31^2) + 5*66^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-4^k*(1+x^2+y^2))/5],r=r+1],{k,0,Log[4,n]},{x,0,Sqrt[(n/4^k-1)/2]},{y,x,Sqrt[n/4^k-1-x^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments