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.

A071928 Kolakoski-(2,4) sequence: a(n) is length of n-th run.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    seed = {2, 4}; w = {}; i = 1; Do[w = Join[w,Array[seed[[Mod[i - 1, Length[seed]] + 1]] &, If[i > Length[w], seed, w][[i]]]]; i++, {n, 36}]; w (* Ivan Neretin, Apr 02 2015 *)

Formula

Generated by infinitely iterating the morphism a->abc, b->dab, c->efg, d->hcd, e->cda, f->bef, g->ghc, h->dab starting with a, obtaining the infinite word abcdabefg..., and then replacing a,b,e,f by 2 and c,d,g,h by 4. - Jeffrey Shallit, Dec 31 2024

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 08 2002