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.

Showing 1-1 of 1 results.

A323116 Fixed point of the morphism 1->221, 2->2211.

Original entry on oeis.org

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

Views

Author

Michel Dekking, Jan 05 2019

Keywords

Comments

A self-generating sequence: there are a(n) 1's between successive pairs 22.
(a(n)) has some similarity with the Kolakoski sequence A000002. It is the fixed point of a 2-block substitution beta. Beta is simply given by
beta(11) = 221221
beta(12) = 2212211
beta(21) = 2211221
beta(22) = 22112211.
However, the fact that beta(a) = a is not entirely trivial, as the iterates of beta are ill-defined (since beta^n(12) and beta^n(21) have odd length for all n>0).
By induction one sees that still, beta(beta(...beta(22))) = sigma^n(22), where sigma is the defining morphism given by sigma(1) = 221, sigma(2) = 2211.

Examples

			2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2,
      2,          2,          1,       1,       2,          2,
		

Crossrefs

Other self-generating sequences: A000002, A001030, A007538, A006337, A018244, etc.

Programs

  • Maple
    f(1):= (2,2,1): f(2):= (2,2,1,1):
    T:= [2]:
    for i from 1 to 5 do T:= map(f,T) od;
    T; # Robert Israel, Jan 07 2019
  • Mathematica
    Nest[Flatten[ReplaceAll[#,{1->{2,2,1},2->{2,2,1,1}}]]&,{2},4] (* Paolo Xausa, Nov 09 2023 *)
Showing 1-1 of 1 results.