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.

A159782 a(0)=1; a(1)=a(2)=a(3)=a(4)=2; a(2n+1)=0 for n >= 2; a(4n)=a(4n-2) = a(n) + a(n+1) for n >= 2.

Original entry on oeis.org

1, 2, 2, 2, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4
Offset: 0

Views

Author

Philippe Deléham, Apr 22 2009

Keywords

Comments

a(n) = {0, 1, 2 or 4}. - Robert G. Wilson v, May 27 2009
Also the number of palindromes of length n in the Thue-Morse sequence (A010060). - Jeffrey Shallit, Feb 19 2013

Crossrefs

Cf. A010060.

Programs

  • Mathematica
    f[n_] := f[n]= Switch[ Mod[n, 4], 0, f[n/4] + f[n/4 + 1], 1, 0, 2, f[(n + 2)/4] + f[(n + 6)/4], 3, 0]; f[0] = 1; f[1] = f[2] = f[3] = f[4] = 2; Table[f@n, {n, 0, 104}] (* Robert G. Wilson v, May 27 2009 *)

Extensions

More terms from Robert G. Wilson v, May 27 2009