A289675 Consider the Post tag system described in A284116 (but adapted to the alphabet {1,2}) ; sequence lists the words that terminate in the empty word.
1, 2, 11, 12, 111, 112, 121, 122, 1111, 1121, 1211, 1221, 2111, 2121, 2211, 2221, 11111, 11112, 11121, 11122, 11211, 11212, 11221, 11222, 12111, 12112, 12121, 12122, 12211, 12212, 12221, 12222, 111111, 111112, 111121, 111122, 112111, 112112, 112121, 112122, 121111, 121112, 121121, 121122, 122111, 122112, 122121, 122122
Offset: 1
Keywords
Examples
Working over the more usual alphabet {0,1}, the following are the orbits of the first few words that terminate at the empty word: [0, -1] [1, 01, 0, -1] [00, 0, -1] [01, 0, -1] [000, 00, 0, -1] [001, 00, 0, -1] [010, 00, 0, -1] [011, 00, 0, -1] [0000, 000, 00, 0, -1] [0010, 000, 00, 0, -1] [0100, 000, 00, 0, -1] [0110, 000, 00, 0, -1] [1000, 01101, 0100, 000, 00, 0, -1] [1010, 01101, 0100, 000, 00, 0, -1] [1100, 01101, 0100, 000, 00, 0, -1] [1110, 01101, 0100, 000, 00, 0, -1] [00000, 0000, 000, 00, 0, -1] ... Writing the initial words in this list over {1,2} rather than {0,1} gives the sequence.
References
- John Stillwell, Elements of Mathematics: From Euclid to Goedel, Princeton, 2016. See page 100, Post's tag system.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..25000
- Emil L. Post, Formal Reductions of the General Combinatorial Decision Problem, Amer. J. Math. 65, 197-215, 1943. See page 204.
Programs
-
Mathematica
A289675 = {}; Do[For[i = 0, i < 2^n, i++, lst = {}; w = IntegerString[i, 2, n]; While[! MemberQ[lst, w], AppendTo[lst, w]; If[w == "", AppendTo[A289675, IntegerString[i, 2, n]]; Break[]]; If[StringTake[w, 1] == "0", w = StringDrop[w <> "00", 3], w = StringDrop[w <> "1101", 3]]]], {n, 6}]; Map[StringReplace[#, {"1" -> "2", "0" -> "1"}] &, A289675] (* Robert Price, Sep 26 2019 *)
Comments