login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A329360
The decimal expansion of a(n) is the first n terms of A000002.
3
0, 1, 12, 122, 1221, 12211, 122112, 1221121, 12211212, 122112122, 1221121221, 12211212212, 122112122122, 1221121221221, 12211212212211, 122112122122112, 1221121221221121, 12211212212211211, 122112122122112112, 1221121221221121122, 12211212212211211221
OFFSET
0,3
MATHEMATICA
kolagrow[q_]:=If[Length[q]<2, Take[{1, 2}, Length[q]+1], Append[q, Switch[{q[[Length[Split[q]]]], q[[-2]], Last[q]}, {1, 1, 1}, 0, {1, 1, 2}, 1, {1, 2, 1}, 2, {1, 2, 2}, 0, {2, 1, 1}, 2, {2, 1, 2}, 2, {2, 2, 1}, 1, {2, 2, 2}, 1]]]
kol[n_Integer]:=If[n==0, {}, Nest[kolagrow, {1}, n-1]];
Table[FromDigits[kol[n]], {n, 0, 30}]
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, Nov 12 2019
STATUS
approved