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.

A299825 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x <= y, x == y (mod 2), and |x+y-z| is a power of 4 (including 4^0 = 1).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 19 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 6, 13, 15, 18, 27, 43, 53, 63, 93, 107, 109, 123, 141, 159, 165, 173, 477, 493, 653, 1005, 16^k*m (k = 0,1,2,... and m = 3, 4, 7, 8).
We have verified that a(n) > 0 for all n = 1..5*10^6.
A weaker version of the conjecture was proved by the author in arXiv:1701.05868.

Examples

			a(8) = 1 since 8 = 2^2 + 2^2 + 0^2 + 0^2 with 2 == 2 (mod 2) and 2 + 2 - 0 = 4.
a(13) = 1 since 13 = 0^2 + 2^2 + 3^2 + 0^2 with 0 == 2 (mod 2) and 0 + 2 - 3 = -4^0.
a(109) = 1 since 109 = 2^2 + 4^2 + 5^2 + 8^2 with 2 == 4 (mod 2) and 2 + 4 - 5 = 4^0.
a(123) = 1 since 123 = 1^2 + 3^2 + 8^2 + 7^2 with 1 == 3 (mod 2) and 1 + 3 - 8 = -4.
a(477) = 1 since 477 = 0^2 + 10^2 + 11^2 + 16^2 with 0 == 10 (mod 2) and 0 + 10 - 11 = -4^0.
a(653) = 1 since 653 = 8^2 + 12^2 + 21^2 + 2^2 with 8 == 12 (mod 2) and 8 + 12 - 21 = -4^0.
a(1005) = 1 since 1005 = 0^2 + 10^2 + 11^2 + 28^2 with 0 == 10 (mod 2) and 0 + 10 - 11 = -4^0.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Pow[n_]:=Pow[n]=IntegerQ[Log[4,n]];
    Do[r=0;Do[If[Mod[x-y,2]==0&&Pow[Abs[x+y-z]]&&SQ[n-x^2-y^2-z^2],r=r+1],{x,0,Sqrt[n/2]},{y,x,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,80}]