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.

A321020 A hybrid of Kolakoski's sequence A000002 and Golomb's sequence A001462: if A001462(n) is odd replace it with 1, if even with 2.

Original entry on oeis.org

1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1
Offset: 1

Views

Author

N. J. A. Sloane, Nov 11 2018

Keywords

Comments

This is A000002 rewritten so the run lengths are given by A001462.
The companion sequence, A001462 rewritten so the run lengths are given by A000002, seems to be A156253.
Note that Kolakoski's sequence A000002 and Golomb's sequence A001462 have very similar definitions, although the asymptotic behavior of A001462 is well-understood, while that of A000002 is a mystery. The asymptotic behavior of the two hybrids A156253 and A321020 might be worth investigating.

Crossrefs

Programs

  • PARI
    a = vector(84, k, k); for (i=1, oo, for (j=1, a[i], a[n++] = i; print1 (2-(i%2) ", "); if (n==#a, break(2)))) \\ Rémy Sigrist, Nov 12 2018