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.

A275656 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 <= z.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 3, 1, 1, 2, 3, 2, 2, 3, 2, 1, 1, 2, 2, 2, 2, 4, 2, 2, 1, 1, 4, 2, 2, 3, 3, 1, 2, 3, 3, 3, 1, 2, 3, 2, 1, 2, 4, 2, 3, 5, 3, 2, 3, 2, 4, 2, 1, 4, 2, 2, 2, 2, 5, 3, 3, 4, 4, 2, 1, 3, 5, 2, 3, 4, 1, 2, 1, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 04 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is stronger than Lagrange's four-square theorem and the conjecture in A275648.

Examples

			a(22) = 1 since 22 = 4^0*(1+1^2+2^2) + 4^2 with 1 < 2 < 4.
a(31) = 1 since 31 = 4^0*(1+1^2+2^2) + 5^2 with 1 < 2 < 5.
a(59) = 1 since 59 = 4^0*(1+0^2+3^2) + 7^2 with 0 < 3 < 7.
a(79) = 1 since 79 = 4^0*(1+2^2+5^2) + 7^2 with 2 < 5 < 7.
a(94) = 1 since 94 = 4^0*(1+2^2+5^2) + 8^2 with 2 < 5 < 8.
a(128) = 1 since 128 = 4^3*(1+0^2+0^2) + 8^2 with 0 = 0 < 8.
a(134) = 1 since 134 = 4^0*(1+4^2+6^2) + 9^2 with 4 < 6 < 9.
a(221) = 1 since 221 = 4*(1+3^2+5^2) + 9^2 with 3 < 5 < 9.
a(254) = 1 since 254 = 4^0*(1+3^2+10^2) + 12^2 with 3 < 10 < 12.
a(349) = 1 since 349 = 4*(1+5^2+7^2) + 7^2  with 5 < 7 = 7.
a(608) = 1 since 608 = 4^2*(1+0^2+1^2) + 24^2 with 0 < 1 < 24.
a(797) = 1 since 797 = 4*(1+0^2+4^2) + 27^2 with 0 < 4 < 27.
a(1181) = 1 since 1181 = 4*(1+9^2+9^2) + 23^2 with 9 = 9 < 23.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-4^k*(1+x^2+y^2)],r=r+1],{k,0,Log[4,n]},{x,0,Sqrt[(n-4^k)/(2*4^k+1)]},{y,x,Sqrt[(n-4^k*(1+x^2))/(4^k+1)]}];Print[n," ",r];Continue,{n,1,80}]