login
A275471
Number of ordered ways to write n as 4^k*(1+x^2+y^2)+z^2, where k,x,y,z are nonnegative integers with x <= y and x == y (mod 2).
1
1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 1, 3, 3, 1, 1, 2, 3, 2, 2, 5, 5, 1, 1, 1, 3, 2, 2, 4, 2, 2, 1, 1, 2, 2, 2, 5, 6, 1, 2, 2, 4, 3, 1, 3, 5, 2, 1, 3, 2, 2, 3, 7, 5, 2, 3, 1, 4, 2, 1, 6, 2, 2, 2, 2, 4, 3, 3, 5, 8, 2, 1, 2, 6, 2, 3, 6, 4, 2, 1, 5
OFFSET
1,4
COMMENTS
Conjecture: a(n) > 0 except for n = 449.
See also A275656, A275678 and A275738 for related conjectures.
As x^2 + y^2 = 2*((x+y)/2)^2 + 2*((x-y)/2)^2, we see that {x^2 + y^2: x and y are integers with x == y (mod 2)} = {2*x^2 + 2*y^2: x and y are integers}.
LINKS
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
EXAMPLE
a(8) = 1 since 8 = 4*(1+0^2+0^2) + 2^2 with 0+0 even.
a(31) = 1 since 31 = 4^0*(1+1^2+5^2) + 2^2 with 1+5 even.
a(47) = 1 since 47 = 4^0*(1+1^2+3^2) + 6^2 with 1+3 even.
a(79) = 1 since 79 = 4^0*(1+5^2+7^2)+2^2 with 5+7 even.
a(1009) = 1 since 1009 = 4^2*(1+1^2+1^2) + 31^2 with 1+1 even.
a(7793) = 1 since 7793 = 4^2*(1+12^2+18^2) + 17^2 with 12+18 even.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-4^k*(1+2x^2+2y^2)], r=r+1], {k, 0, Log[4, n]}, {x, 0, Sqrt[(n/4^k-1)/4]}, {y, x, Sqrt[(n/4^k-1-2x^2)/2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 11 2016
STATUS
approved