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.

A342682 a(1) = 1; for n > 0: a(2*n) = -a(n+1), a(2*n+1) = a(n) + a(n+1).

Original entry on oeis.org

1, 0, 1, -1, 1, 1, 0, -1, 0, -1, 2, 0, 1, 1, -1, 0, -1, 1, -1, -2, 1, 0, 2, -1, 1, -1, 2, 1, 0, 0, -1, 1, -1, -1, 0, 1, 0, 2, -3, -1, -1, 0, 1, -2, 2, 1, 1, -1, 0, 1, 0, -2, 1, -1, 3, 0, 1, 0, 0, 1, -1, -1, 0, 1, 0, 1, -2, 0, -1, -1, 1, 0, 1, -2, 2, 3, -1, 1, -4
Offset: 1

Views

Author

George Beck, May 18 2021

Keywords

Examples

			a(2) = -a(2), so a(2) = 0; a(11) = a(5) + a(6) = 1 + 1 = 2.
		

Crossrefs

Programs

  • Mathematica
    a@1 = 1;
    a@2 = 0;
    a@n_ := -a[n/2 + 1] /; EvenQ@n;
    a@n_ := a[1/2 (n - 1)] + a[1/2 (n - 1) + 1] /; OddQ@n;
    a /@ Range[128]