OFFSET
1,1
COMMENTS
From Michel Dekking, Sep 17 2019: (Start)
Let sigma be the defining morphism of A287104: 0->10, 1->12, 2->0.
Let u=01, v=012, w=0121 be the return words of the word 0.
[See Justin & Vuillon (2000) for definition of return word. - N. J. A. Sloane, Sep 23 2019]
Then under sigma u, v and w are mapped to
sigma(01) = 1012, sigma(012) = 10120, sigma(0121) = 1012012.
Moving the prefix 1 of these three images to the end, the sequence 0 a (i.e., (a(n)) prefixed by the symbol 0), is a fixed point when iterating.
This iteration process induces a morphism 2->4, 3->32, 4->34 on the return words, coded by their lengths.
Coding the symbols according to 2<->2, 4<->0, 3<->1, this leads to the morphism 2->0, 1->12, 0->10 on the alphabet {0,1,2}.
This is simply sigma, which has A287104 as its unique fixed point. So the sequence d of first differences of (a(n)) equals A287104 with the coding above. Noting that the code can be written as x->4-x, this gives the formula below.
(End)
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
Jacques Justin and Laurent Vuillon, Return words in Sturmian and episturmian words, RAIRO-Theoretical Informatics and Applications 34.5 (2000): 343-356.
FORMULA
a(n) = 4n-1 + Sum_{k=2..n} A287104(k). - Michel Dekking, Sep 17 2019
MATHEMATICA
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 21 2017
STATUS
approved