This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A289673 #27 Aug 18 2017 16:43:39 %S A289673 -1,12,1,1,212,212,11,11,11,11,2212,2212,2212,2212,111,211,111,211, %T A289673 111,211,111,211,12212,22212,12212,22212,12212,22212,12212,22212,1111, %U A289673 1211,2111,2211,1111,1211,2111,2211,1111,1211,2111,2211,1111,1211,2111,2211,112212 %N A289673 Take n-th string over {1,2} in lexicographic order and apply the Post tag system described in A284116 (but adapted to the alphabet {1,2}) just once. %C A289673 Post's tag system maps a word w over {1,2} to w', where if w begins with 1, w' is obtained by appending 11 to w and deleting the first three letters, or if w begins with 2, w' is obtained by appending 2212 to w and deleting the first three letters. %C A289673 The empty word is denoted by -1. %C A289673 We work over {1,2} rather than the official alphabet {0,1} because of the prohibition in the OEIS of terms (other than 0 itself) which begin with 0. %H A289673 Chai Wah Wu, <a href="/A289673/b289673.txt">Table of n, a(n) for n = 1..10000</a> %e A289673 The initial words are: %e A289673 1,2,11,12,21,22,111,112,121,122,211,212,221,222,1111,... %e A289673 Applying the tag system over {1,2} these become: %e A289673 -1, 12, 1, 1, 212, 212, 11, 11, 11, 11, 2212, 2212, 2212, 2212, 111, ... %e A289673 If we were working over {0,1} the initial strings would be: %e A289673 0,1,00,01,10,11,000,001,010,011,100,101,110,111,0000,... %e A289673 and applying the tag system over {0,1} described in A284116 these would become: %e A289673 -1, 01, 0, 0, 101, 101, 00, 00, 00, 00, 1101, 1101, 1101, 1101, 000, ... %p A289673 See A291072. %o A289673 (Python) %o A289673 from itertools import product %o A289673 A289673_list = [-1 if s == ('1',) else int((''.join(s)+('2212' if s[0] == '2' else '11'))[3:]) for l in range(1,10) for s in product('12',repeat=l)] # _Chai Wah Wu_, Aug 06 2017 %Y A289673 Cf. A284116, A284119, A284121, A289670, A289671, A289672, A289674, A289675. %Y A289673 See also A291072, A291073, A291074. %K A289673 sign %O A289673 1,2 %A A289673 _N. J. A. Sloane_, Jul 29 2017 %E A289673 More terms from _Chai Wah Wu_, Aug 06 2017