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.

A339273 Sums of two nonzero even squares.

Original entry on oeis.org

8, 20, 32, 40, 52, 68, 72, 80, 100, 104, 116, 128, 136, 148, 160, 164, 180, 200, 208, 212, 232, 244, 260, 272, 288, 292, 296, 320, 328, 340, 356, 360, 388, 392, 400, 404, 416, 424, 436, 452, 464, 468, 488, 500, 512, 520, 544, 548, 580, 584, 592, 596, 612, 628, 640, 648, 656
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 24 2020

Keywords

Examples

			20 is in the sequence since it is the sum of two nonzero even squares, 2^2 + 4^2 = 4 + 16 = 20.
		

Crossrefs

Programs

  • Mathematica
    Table[If[Sum[Mod[i + 1, 2] Mod[n - i + 1, 2] (Floor[Sqrt[i]] - Floor[Sqrt[i - 1]]) (Floor[Sqrt[n - i]] - Floor[Sqrt[n - i - 1]]), {i, Floor[n/2]}] > 0, n, {}], {n, 700}] // Flatten

Formula

a(n) = 4*A000404(n).
Characteristic function: sign(Sum_{k=1..floor(n/2)} ((k+1) mod 2) * ((n-k+1) mod 2) * c(k) * c(n-k)), where c is the characteristic function of squares (A010052).