cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 11 2016

Keywords

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}.

Examples

			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.
		

Crossrefs

Programs

  • 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}]