%I #19 Oct 04 2018 20:04:57
%S 2,2,0,2,1,2,0,0,2,0,1,2,1,0,2,1,1,2,0,0,0,2,0,0,1,2,0,1,0,2,0,1,1,2,
%T 1,0,0,2,1,0,1,2,1,1,0,2,1,1,1,2,0,0,0,0,2,0,0,0,1,2,0,0,1,0,2,0,0,1,
%U 1,2,0,1,0,0,2,0,1,0,1,2,0,1,1,0,2,0,1
%N Infinite word over {0,1,2} formed from list of binary words of lengths 0, 1, 2, etc., including empty word, each prefixed by a 2.
%H Rémy Sigrist, <a href="/A319954/b319954.txt">Table of n, a(n) for n = 0..25000</a>
%H Carl Pomerance, John Michael Robson, and Jeffrey Shallit, <a href="https://doi.org/10.1016/S0304-3975(96)00189-2">Automaticity II: Descriptional complexity in the unary case</a>, Theoretical computer science 180.1-2 (1997): 181-201.
%F a(n) = A030302(n+1) + [n belongs to A001855] (where [] is an Iverson bracket). - _Rémy Sigrist_, Oct 04 2018
%e The word written without commas:
%e 220212002012102112000200120102011210021012110211120000200012001020011...
%o (PARI) k=0; for (n=0, oo, b=binary(n+1); b[1]++; for (i=1, #b, print1 (b[i] ", "); if (k++==87, quit))) \\ _Rémy Sigrist_, Oct 04 2018
%Y Cf. A001855, A030302, A214339, A319953.
%K nonn,base
%O 0,1
%A _N. J. A. Sloane_, Oct 04 2018
%E Data corrected and extended by _Rémy Sigrist_, Oct 04 2018