OFFSET
1,1
COMMENTS
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 five letters, or if w begins with 2, w' is obtained by appending 1221222 to w and deleting the first five letters.
It can be shown that under this tag system every word different from "1" has an infinite orbit [De Mol, p. 307].
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1025
Liesbeth De Mol, Tracing unsolvability. A historical, mathematical and philosophical analysis with a special focus on tag systems, Ph.D. Thesis, Universiteit Gent. See page 307.
MAPLE
with(StringTools);
f1:=proc(w) local L, t2, t1, ws, w2;
t1:="2112"; t2:="1221222"; ws:=convert(w, string);
if ws[1]="1" then w2:=Join([ws, t1], ""); else w2:=Join([ws, t2], ""); fi;
L:=length(w2); if L <= 3 then return(-1); fi;
w2[6..L]; end;
# and apply f1 repeatedly to "2"
PROG
(Python)
from itertools import islice
def agen(w="2"):
while True:
yield int(w)
w += ("2112" if w[0] == "1" else "1221222")
w = w[5:]
print(list(islice(agen(), 20))) # Michael S. Branicky, Jan 06 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 23 2017
STATUS
approved