[go: up one dir, main page]

login
A245555
Trajectory of 1 under the morphism 1 -> 12, 2 -> 23, 3 -> 31.
2
1, 2, 2, 3, 2, 3, 3, 1, 2, 3, 3, 1, 3, 1, 1, 2, 2, 3, 3, 1, 3, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 1, 3, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 3, 3, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 1, 2, 3, 3, 1, 3, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 3, 3, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3
OFFSET
1,2
COMMENTS
The morphism 1->12, 2->21 gives the {1,2} version of the Thue-Morse sequence A001285, cf. A010060.
The morphism 0->01, 1->12, 2->20 gives the generalized Thue-Morse sequence A071858.
FORMULA
a(n) = A071858(n+1) + 1. - Michel Dekking, Sep 29 2020
MATHEMATICA
Nest[ Function[ l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {2, 3}, 3 -> {3, 1}})] }], {1}, 9]
PROG
(PARI) {a(n) = my(v = [1]); if( n<1, 0, while( #v<n, v = concat( vector(#v, i, [[1, 2], [2, 3], [3, 1]] [v[i]]))); v[n])}; /* Michael Somos, Aug 05 2014 */
CROSSREFS
Essentially the same as A071858.
Sequence in context: A350883 A072832 A080328 * A031266 A238459 A109301
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 03 2014
STATUS
approved