OFFSET
1,2
COMMENTS
From Michel Dekking, Sep 16 2019: (Start)
Let sigma be the defining morphism in A287104: 0->10, 1->12, 2->0.
Let u := 10, v := 12, w: = 120 be the return words of the word 1. [See Justin & Vuillon (2000) for definition of return word. - N. J. A. Sloane, Sep 23 2019]
Then
sigma(u) = vu, sigma(v) = w, sigma(w) = wu.
If we code w<->0, u<->1, v<->2, then this morphism turns into the morphism
0 -> 01, 1 -> 21, 2 -> 0.
This is exactly the morphism which has A287072 as unique fixed point.
Since u and v have length 2 and w has length 3, this implies that the sequence d of first differences of (a(n)) equals A287072 with the projection 0 -> 3, 1 -> 2, 2 -> 2. 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) = 1 + Sum_{k=1..n-1} d(k), where d(k) = 3 if A287072(k)=0, and d(k) = 2 otherwise, for k = 1,...,n. - Michel Dekking, Sep 16 2019
MATHEMATICA
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 21 2017
STATUS
approved