A275678 Number of ordered ways to write n as 4^k*(1+4*x^2+y^2) + z^2, where k,x,y,z are nonnegative integers with x <= y.
1, 2, 1, 1, 3, 3, 1, 2, 3, 4, 2, 1, 2, 3, 2, 1, 4, 4, 1, 3, 5, 3, 1, 3, 5, 5, 3, 1, 2, 7, 2, 2, 5, 3, 3, 3, 6, 2, 2, 4, 6, 7, 1, 2, 4, 7, 1, 1, 3, 5, 5, 2, 5, 5, 4, 3, 8, 4, 2, 2, 1, 7, 3, 1, 6, 8, 2, 4, 8, 6, 2, 4, 6, 3, 4, 1, 3, 6, 2, 3
Offset: 1
Keywords
Examples
a(12) = 1 since 12 = 4*(1+4*0^2+1^2) + 2^2 with 0 < 1. a(19) = 1 since 19 = 4^0*(1+4*0^2+3^2) + 3^2 with 0 < 3. a(61) = 1 since 61 = 4*(1+4*1^2+2^2) + 5^2 with 1 < 2. a(125) = 1 since 125 = 4*(1+4*0^2+0^2) + 11^2 with 0 = 0. a(359) = 1 since 359 = 4^0*(1+4*7^2+9^2) + 9^2 with 7 < 9. a(196253) = 1 since 196253 = 4*(1+4*0^2+0^2) + 443^2 with 0 = 0.
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+4x^2+y^2)],r=r+1],{k,0,Log[4,n]},{x,0,Sqrt[(n/4^k-1)/5]},{y,x,Sqrt[n/4^k-1-4x^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments