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.

A108882 Period doubling sequence starting with '1 0 1'.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1
Offset: 1

Views

Author

Alexandre Losev, Jul 14 2005

Keywords

Comments

Start with S = 1,0,1; replace S by SS and complement the last bit; iterate.
Similar to A035263 but with a different start.

Crossrefs

Cf. A035263.

Programs

  • Mathematica
    f[l_] := Block[{s = Flatten[{l, l}]}, s[[ -1]] = Mod[s[[ -1]] + 1, 2]; s]; Nest[f, {1, 0, 1}, 6] (* Robert G. Wilson v, Jul 16 2005 *)
  • Python
    def f(l):
        s = l + l
        s[-1] = (s[-1] + 1) % 2
        return s
    result = [1, 0, 1]
    for _ in range(6):
        result = f(result)
    print(result) # Robert C. Lyons, Jan 19 2025

Extensions

More terms from Robert G. Wilson v, Jul 16 2005