login
A323116
Fixed point of the morphism 1->221, 2->2211.
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, 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,1
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.
LINKS
F. M. Dekking, Regularity and irregularity of sequences generated by automata, Séminaire de Théorie des Nombres de Bordeaux (1979-1980), Exp. No. 9, 10 pp., Univ. Bordeaux I, Talence, 1980.
EXAMPLE
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,
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 *)
CROSSREFS
Other self-generating sequences: A000002, A001030, A007538, A006337, A018244, etc.
Sequence in context: A014695 A211263 A303827 * A218344 A211272 A298600
KEYWORD
nonn
AUTHOR
Michel Dekking, Jan 05 2019
STATUS
approved