login
A316329
Image of 3 under repeated applications of the morphism 1 -> 11, 2 -> 2, 3 -> 312.
0
3, 312, 312112, 31211211112, 31211211112111111112, 3121121111211111111211111111111111112, 3121121111211111111211111111111111112111111111111111111111111111111112
OFFSET
0,1
COMMENTS
a(n) has length 2^n + n.
REFERENCES
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, Problem 4, p. 242.
MAPLE
b:= proc(n) option remember; `if`(n=0, 3, (l-> subs(3=
[3, 1, 2][], subs(1=[1$2][], l))[])([b(n-1)])) end:
a:= n-> parse(cat(b(n))):
seq(a(n), n=0..6); # Alois P. Heinz, May 26 2021
MATHEMATICA
FromDigits /@ SubstitutionSystem[{1 -> {1, 1}, 2 -> {2}, 3 -> {3, 1, 2}}, {3}, 6] (* Jean-François Alcover, May 14 2022 *)
CROSSREFS
Sequence in context: A132305 A074327 A179109 * A062333 A222725 A303893
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 14 2018
EXTENSIONS
a(2) corrected by Georg Fischer, May 26 2021
STATUS
approved