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.

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.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 05 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Any positive integer can be written as 4^k*(1+4*x^2+y^2) + z^2, where k,x,y,z are nonnegative integers with x <= z.
This is stronger than Lagrange's four-square theorem. We have shown that each n = 1,2,3,... can be written as 4^k*(1+4*x^2+y^2) + z^2 with k,x,y,z nonnegative integers.
See also A275656, A275675 and A275676 for similar conjectures.

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.
		

Crossrefs

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