login
The decimal expansion of a(n) is the first n terms of A000002.
3

%I #4 Nov 13 2019 08:18:10

%S 0,1,12,122,1221,12211,122112,1221121,12211212,122112122,1221121221,

%T 12211212212,122112122122,1221121221221,12211212212211,

%U 122112122122112,1221121221221121,12211212212211211,122112122122112112,1221121221221121122,12211212212211211221

%N The decimal expansion of a(n) is the first n terms of A000002.

%t 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]]]

%t kol[n_Integer]:=If[n==0,{},Nest[kolagrow,{1},n-1]];

%t Table[FromDigits[kol[n]],{n,0,30}]

%Y Cf. A000002, A054353, A088568, A288605, A296658, A329315, A329316, A329355, A329356, A329361, A329362.

%K nonn,base

%O 0,3

%A _Gus Wiseman_, Nov 12 2019