cp's OEIS Frontend

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.

Showing 1-8 of 8 results.

A284116 a(n) = largest number of distinct words arising in Post's tag system {00, 1101} applied to a binary word w, over all starting words w of length n, or a(n) = -1 if there is a word w with an unbounded trajectory.

Original entry on oeis.org

4, 7, 6, 7, 22, 23, 24, 25, 30, 31, 34, 421, 422, 423, 422, 423, 424, 2169, 2170, 2171, 2170, 2171, 2172, 2165, 2166, 2167, 24566, 24567, 24568, 24567, 24568, 24569, 24568, 24569, 24570, 253513, 253514, 342079, 342080, 342083, 342084, 342103, 20858070
Offset: 1

Views

Author

Jeffrey Shallit, Mar 20 2017

Keywords

Comments

Post's tag system {00, 1101} maps a word w over {0,1} to w', where if w begins with 0, w' is obtained by appending 00 to w and deleting the first three letters, or if w begins with 1, w' is obtained by appending 1101 to w and deleting the first three letters.
The empty word is included in the count.
It is an important open question to decide if there is any word whose orbit grows without limit. - N. J. A. Sloane, Jul 30 2017, based on an email from Allan C. Wechsler
Comment from Don Reble, Aug 01 2017: For n <= 57, all words reach the empty word or a cycle. - N. J. A. Sloane, Aug 01 2017
From David A. Corneth, Aug 02 2017: (Start)
A word w can be described by the pair (c, d) where c is the length of w and d is the number represented by the binary word w. Then 0 <= d < 2^c.
Appending a word ww of m letters to w is the same as setting d to 2^m * w + ww. Preserving only the rightmost q digits of w is the same as setting w to w mod 2^q.
Lastly, we're only really interested in the 1st, 4th, 7th, ... leftmost digits. The others could without loss of generality be set to 0. This can be done with bitand(x, y), with y in A033138.
Therefore this problem can be formulated as follows: Let w = (c, d).
Then if d < 2^(c - 1), w' = (c - 1, bitand(4*d, floor(2^(c + 1) / 7)))
else (if (d >= 2^(c - 1)), w' = (c + 1, bitand(16*d + 13, floor(2^(c + 3) / 7))).
To find a(n), it would be enough to check values d in A152111 with n binary digits and c = n.
(End)
a(110) >= 43913328040672, from w = (100)^k, k=110. - N. J. A. Sloane, Oct 23 2017, based on Lars Blomberg's work on A291792.

Examples

			Suppose n=1. Then w = 0 ->000 -> w' = empty word, and w = 1 -> 11101 -> w' = 01 -> 0100 -> w'' = 0 -> 000 -> w''' = empty word. So a(1) = 4 by choosing w = 1.
For n = 5 the orbit of the word 10010 begins 10010, 101101, 1011101, ..., 0000110111011101, and the next word in the orbit has already appeared. The orbit consists of 22 distinct words.
From _David A. Corneth_, Aug 02 2017: (Start)
The 5-letter word w = 10100 can be described as (a, b) = (5, 20). This is equivalent to (5, bitand(20, floor(2^7 / 7))) = (5, bitand(20, 18)) = (5, 16).
As 16 >= 2^(5-1), w' = (5 + 1, bitand(16*16 + 13, floor(2^(5 + 3) / 7))) = (6, bitand(279, 36)) = (6, 4). w'' = w = (5, 16) so 10100 ~ 10000 ends in a period. (End)
Words w that achieve a(1) through a(7) are 1, 10, 100, 0001, 10010, 100000, 0001000. - _N. J. A. Sloane_, Aug 17 2017
		

References

  • John Stillwell, Elements of Mathematics: From Euclid to Goedel, Princeton, 2016. See page 100, Post's tag system.

Crossrefs

For the 3-shift tag systems {00,1101}, {00, 1011}, {00, 1110}, {00, 0111} see A284116, A291067, A291068, A291069 respectively (as well as the cross-referenced entries mentioned there).

Programs

  • Mathematica
    Table[nmax = 0;
     For[i = 0, i < 2^n, i++, lst = {};
      w = IntegerString[i, 2, n];
      While[! MemberQ[lst, w],
       AppendTo[lst, w];
       If[w == "", Break[]];
       If[StringTake[w, 1] == "0", w = StringDrop[w <> "00", 3],
        w = StringDrop[w <> "1101", 3]]];
    nmax = Max[nmax, Length[lst]]]; nmax, {n, 1, 12}] (* Robert Price, Sep 26 2019 *)
    (* Or, using the (c,d) procedure: *)
     Table[nmax = 0;
     For[i = 0, i < 2^n, i++,
      c = n; d = i; lst = {};
      While[! MemberQ[lst, {c, d}],
       AppendTo[lst, {c, d}];
       If[c == 0,  Break[]];
       If[ d < 2^(c - 1),
        d = BitAnd[4*d, 2^(c - 1) - 1]; c--,
        d = BitAnd[16*d + 13, 2^(c + 1) - 1]; c++]];
    nmax = Max[nmax, Length[lst]]]; nmax, {n, 1, 12}] (* Robert Price, Sep 26 2019 *)

Extensions

a(19)-a(43) from Lars Blomberg, Apr 09 2017
Edited by N. J. A. Sloane, Jul 29 2017 and Oct 23 2017 (adding escape clause in case an infinite trajectory exists)

A289677 a(n) = A289671(n)/2^f(n), where f(n) = 2*floor((n-1)/3) + ((n+2) mod 3) = A004523(n).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 4, 5, 11, 12, 13, 22, 19, 20, 43, 46, 44, 85, 88, 89, 171, 185, 192, 366, 380, 396, 774, 793, 814, 1586, 1589, 1610, 3136, 3106, 3130, 6123, 6078, 6103, 12088, 12147, 12229, 24283, 24534, 24736, 49040, 49482, 49879, 99031, 99792, 100747, 200444, 201892, 203765, 405931, 408478, 411403
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2017

Keywords

Comments

This is the number of distinct binary words w of length n that eventually cycle under the Post tag system (see A284116, A289670) reduced to take into account the observation made by Don Reble that (if the bits of w are labeled from the left starting at bit 0) bits 1,2,4,5,7,8,... (not a multiple of 3) are "junk DNA" and have no effect on the outcome.

Crossrefs

Programs

  • Python
    from _future_ import division
    def A289677(n):
        c, k, r, n2, cs, ts = 0, 1+(n-1)//3, 2**((n-1) % 3), 2**(n-1), set(), set()
        for i in range(2**k):
            j, l = int(bin(i)[2:],8)*r, n2
            traj = set([(l,j)])
            while True:
                if j >= l:
                    j = j*16+13
                    l *= 2
                else:
                    j *= 4
                    l //= 2
                if l == 0:
                    ts |= traj
                    break
                j %= 2*l
                if (l,j) in traj:
                    c += 1
                    cs |= traj
                    break
                if (l,j) in cs:
                    c += 1
                    break
                if (l,j) in ts:
                    break
                traj.add((l,j))
        return c # Chai Wah Wu, Aug 03 2017

Extensions

Corrected by Don Reble, Aug 01 2017 (there were errors in A289671).

A290441 a(n) = A289677(3*n).

Original entry on oeis.org

1, 3, 5, 13, 20, 44, 89, 192, 396, 814, 1610, 3130, 6103, 12229, 24736, 49879, 100747, 203765, 411403
Offset: 1

Views

Author

N. J. A. Sloane, Aug 02 2017

Keywords

Comments

No formulas or recurrences are known for the important sequences A289670 and A289671. The essence of these two sequences is captured in the six entries A290436-A290441. Any numerical properties of these would be most welcome.

Crossrefs

A289676 a(n) = A289670(n)/2^f(n), where f(n) = 2*floor((n-1)/3) + ((n+2) mod 3).

Original entry on oeis.org

2, 1, 1, 2, 2, 1, 4, 4, 3, 5, 4, 3, 10, 13, 12, 21, 18, 20, 43, 40, 39, 85, 71, 64, 146, 132, 116, 250, 231, 210, 462, 459, 438, 960, 990, 966, 2069, 2114, 2089, 4296, 4237, 4155, 8485, 8234, 8032, 16496, 16054, 15657, 32041, 31280, 30325, 61700, 60252, 58379, 118357, 115810, 112885
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2017

Keywords

Comments

This is the number of distinct binary words w of length n that terminate under the Post tag system (see A284116, A289670) reduced to take into account the observation made by Don Reble that (if the bits of w are labeled from the left starting at bit 0) bits 1,2,4,5,7,8,... (not a multiple of 3) are "junk DNA" and have no effect on the outcome.

Crossrefs

Programs

  • Python
    from _future_ import division
    def A289676(n):
        c, k, r, n2, cs, ts = 0, 1+(n-1)//3, 2**((n-1) % 3), 2**(n-1), set(), set()
        for i in range(2**k):
            j, l = int(bin(i)[2:],8)*r, n2
            traj = set([(l,j)])
            while True:
                if j >= l:
                    j = j*16+13
                    l *= 2
                else:
                    j *= 4
                    l //= 2
                if l == 0:
                    c += 1
                    ts |= traj
                    break
                j %= 2*l
                if (l,j) in traj:
                    cs |= traj
                    break
                if (l,j) in cs:
                    break
                if (l,j) in ts:
                    c += 1
                    break
                traj.add((l,j))
        return c # Chai Wah Wu, Aug 03 2017

Extensions

Corrected by Don Reble, Aug 01 2017 (there were errors in A289670)

A290437 a(n) = A289676(3*n+2).

Original entry on oeis.org

1, 2, 4, 4, 13, 18, 40, 71, 132, 231, 459, 990, 2114, 4237, 8234, 16054, 31280, 60252, 115810
Offset: 0

Views

Author

N. J. A. Sloane, Aug 02 2017

Keywords

Comments

No formulas or recurrences are known for the important sequences A289670 and A289671. The essence of these two sequences is captured in the six entries A290436-A290441. Any numerical properties of these would be most welcome.

Crossrefs

A290438 a(n) = A289676(3*n).

Original entry on oeis.org

1, 1, 3, 3, 12, 20, 39, 64, 116, 210, 438, 966, 2089, 4155, 8032, 15657, 30325, 58379, 112885
Offset: 1

Views

Author

N. J. A. Sloane, Aug 02 2017

Keywords

Comments

No formulas or recurrences are known for the important sequences A289670 and A289671. The essence of these two sequences is captured in the six entries A290436-A290441. Any numerical properties of these would be most welcome.

Crossrefs

A290439 a(n) = A289677(3*n+1).

Original entry on oeis.org

0, 2, 4, 11, 22, 43, 85, 171, 366, 774, 1586, 3136, 6123, 12088, 24283, 49040, 99031, 200444, 405931
Offset: 0

Views

Author

N. J. A. Sloane, Aug 02 2017

Keywords

Comments

No formulas or recurrences are known for the important sequences A289670 and A289671. The essence of these two sequences is captured in the six entries A290436-A290441. Any numerical properties of these would be most welcome.

Crossrefs

A290440 a(n) = A289677(3*n+2).

Original entry on oeis.org

1, 2, 4, 12, 19, 46, 88, 185, 380, 793, 1589, 3106, 6078, 12147, 24534, 49482, 99792, 201892, 408478
Offset: 0

Views

Author

N. J. A. Sloane, Aug 02 2017

Keywords

Comments

No formulas or recurrences are known for the important sequences A289670 and A289671. The essence of these two sequences is captured in the six entries A290436-A290441. Any numerical properties of these would be most welcome.

Crossrefs

Showing 1-8 of 8 results.