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 A290741 #32 Mar 15 2022 12:31:36 %S A290741 2,21222,221221222,2212221221222,22212212221221222, %T A290741 122122212212221221222,1222122122212212222112,21221222122122221122112, %U A290741 212221221222211221121221222,2212212222112211212212221221222,22122221122112122122212212221221222,222211221121221222122122212212221221222 %N A290741 Orbit of word "2" under the 3-shift tag system over the alphabet {1,2} defined in the Comments. %C A290741 This tag system maps a word w over {1,2} to w', where if w begins with 1, w' is obtained by appending 2112 to w and deleting the first three letters, or if w begins with 2, w' is obtained by appending 1221222 to w and deleting the first three letters. %C A290741 This is a 3-shift version of a 5-shift tag system studied in [De Mol, p. 307] (cf. A293945). %H A290741 Michael S. Branicky, <a href="/A290741/b290741.txt">Table of n, a(n) for n = 1..328</a> %H A290741 Liesbeth De Mol, <a href="http://www.clps.ugent.be/sites/default/files/publications/dissertation.pdf">Tracing unsolvability. A historical, mathematical and philosophical analysis with a special focus on tag systems</a>, Ph.D. Thesis, Universiteit Gent. See page 307. %p A290741 with(StringTools); %p A290741 f1:=proc(w) local L, t2, t1, ws, w2; %p A290741 t1:="2112"; t2:="1221222"; ws:=convert(w, string); %p A290741 if ws[1]="1" then w2:=Join([ws, t1], ""); else w2:=Join([ws, t2], ""); fi; %p A290741 L:=length(w2); if L <= 3 then return(-1); fi; %p A290741 w2[4..L]; end; %p A290741 # and apply f1 repeatedly to "2" %o A290741 (Python) %o A290741 from itertools import islice %o A290741 def agen(w="2"): %o A290741 while True: %o A290741 yield int(w) %o A290741 w += ("2112" if w[0] == "1" else "1221222") %o A290741 w = w[3:] %o A290741 print(list(islice(agen(), 12))) # _Michael S. Branicky_, Mar 15 2022 %Y A290741 Cf. A284116, A290742, A293945. %K A290741 nonn %O A290741 1,1 %A A290741 _N. J. A. Sloane_, Aug 11 2017 %E A290741 Definition corrected by _N. J. A. Sloane_, Oct 23 2017 (this is not De Mol's 5-shift tag system, which is described in A293945).