OFFSET
1,2
COMMENTS
LINKS
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
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 03 2014
STATUS
approved