OFFSET
1,1
COMMENTS
From Michel Dekking, Sep 16 2019: (Start)
Let sigma be the defining morphism of A287104: 0->10, 1->12, 2->0.
Let u=201, v=2101, w=20101 be the return words of the word 2.
Under sigma u, v, and w are mapped to sigma(201) = 01012, sigma(2101) = 0121012, sigma(20101) = 010121012.
All three images have suffix 2. We can therefore move this suffix to the front of all three images, obtaining the fixed point (a(n+1)) = 20101... when iterating. This induces the morphism 3 -> 5, 4 -> 34, 5 -> 54 on the return words, coded by their lengths.
Coding the symbols according to 3<->2, 4<->1, 5<->0, this leads to the morphism 2->0, 1->21, 0->01 on the alphabet {0,1,2}. This is exactly the morphism which has A287072 as unique fixed point. So the sequence d of first differences of (a(n)) equals A287072 with the coding above. This gives the formula below.
(End)
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 2 + Sum_{k=1..n-1} d(k), where d(k)=5 if A287072(k)=0, d(k)=4 if A287072(k)=1, and d(k)=3 if A287072(k)=2. - Michel Dekking, Sep 16 2019
MATHEMATICA
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 21 2017
STATUS
approved