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-9 of 9 results.

A357082 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of a(n-1) + a(n) does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 9, 7, 17, 12, 20, 13, 16, 18, 11, 21, 15, 19, 23, 38, 26, 8, 24, 37, 27, 34, 30, 31, 33, 32, 40, 36, 28, 44, 41, 35, 29, 43, 39, 25, 47, 53, 51, 49, 42, 22, 50, 14, 58, 46, 54, 62, 65, 63, 66, 67, 61, 68, 60, 69, 59, 70, 74, 55, 73, 56, 72, 57, 71, 75, 78, 76, 52, 77, 92
Offset: 0

Views

Author

Scott R. Shannon, Sep 11 2022

Keywords

Comments

The main concentration of terms lie along the line a(n) = n, so numerous fixed points exists - there are 301 fixed points in the first 300000 terms. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(6) = 10 as the concatenation of a(0)..a(5) in binary is "011011100101" and a(5) + 10 = 5 + 10 = 15 = 1111_2 which does not appear in the concatenated string. Since  11 = 1011_2, 12 = 1100_2, 13 = 1101_2, 14 = 1110_2 all appear in the concatenated string, a(6) cannot be 6, 7, 8 or 9.
		

Crossrefs

Programs

Extensions

Images for n=0..300000 and n=0..2250000 corrected by Scott R. Shannon, Oct 05 2022

A355611 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of |a(n) - a(n-1)| does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 3, 5, 9, 17, 7, 23, 2, 12, 22, 6, 16, 37, 58, 10, 38, 4, 32, 60, 14, 48, 82, 8, 42, 85, 15, 61, 107, 11, 67, 131, 18, 86, 13, 77, 141, 21, 89, 25, 93, 20, 84, 148, 19, 83, 147, 27, 91, 155, 26, 90, 154, 24, 88, 152, 28, 92, 156, 36, 100, 164, 30, 94, 158, 29, 142, 78, 191, 31, 95, 159
Offset: 0

Views

Author

Scott R. Shannon, Sep 12 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 200000 terms the only fixed points are 1199 and 14767. It is unknown if more exist.

Examples

			a(5) = 17 as the concatenation of a(0)..a(4) in binary is "01111011001" and |17 - a(4)| = |17 - 9| = 8 = 1000_2 which does not appear in the concatenated string. Since 1 = 1_2, 2 = 10_2, 3 = 11_2, 4 = 100_2, 5 = 101_2, 6 = 110_2, 7 = 111_2 all appear in the concatenated string, a(5) cannot be less than 17.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, astr, an, mink, mindiff = [], set(), "", 0, 1, 1
        for n in count(0):
            yield an; aset.add(an); astr += bin(an)[2:]
            prevan, an = an, mink
            while an + mindiff <= prevan and (an in aset or bin(abs(an-prevan))[2:] in astr): an += 1
            if an in aset or bin(abs(an-prevan))[2:] in astr:
                an = max(mink, prevan + mindiff)
                while an in aset or bin(an-prevan)[2:] in astr:
                    an += 1
            while mink in aset: mink += 1
            while bin(mindiff)[2:] in astr: mindiff += 1
    print(list(islice(agen(), 72))) # Michael S. Branicky, Oct 05 2022

A342303 a(0) = 1; for n >= 1, a(n) = the decimal value of the binary number of the total binary digits back from the end of the concatenation of all previous binary terms where the binary value of n last appeared. If the binary value of n has not previously appeared then a(n) = 0.

Original entry on oeis.org

1, 1, 0, 3, 0, 5, 6, 4, 0, 0, 7, 14, 0, 16, 10, 15, 13, 0, 21, 0, 39, 10, 58, 8, 0, 49, 16, 81, 68, 36, 49, 72, 0, 39, 33, 25, 25, 0, 40, 16, 11, 106, 6, 7, 0, 9, 10, 26, 60, 85, 11, 70, 40, 9, 214, 30, 32, 52, 16, 0, 65, 30, 6, 226, 0, 24, 130, 161, 20, 0, 99, 0, 68, 216, 136, 0, 62, 26, 129
Offset: 0

Views

Author

Scott R. Shannon, Mar 07 2021

Keywords

Comments

The longest run of 0 terms, corresponding to binary values that have not previously appeared, for n up to 100000 is four, starting at n = 512. Not all powers of 2 are 0 as it may have appeared as a previous value's offset, e.g., a(65536) = 412323.

Examples

			a(1) = 1 as the binary string concatenation up to a(0) = '1', and the binary value of 1 is '1' which appears 1 (1_2) digit back from the end of the string.
a(2) = 0 as the binary string concatenation up to a(1) = '11', while the binary value of 2 is '10' which does not appear in the string.
a(3) = 3 as the binary string concatenation up to a(2) = '110', and the binary value of 3 is '11' which appears 3 (11_2) digits back from the end of the string.
a(5) = 5 as the binary string concatenation up to a(4) = '110110', and the binary value of 5 is '101' which appears 5 (101_2) digits back from the end of the string.
a(10) = 7 as the binary string concatenation up to a(9) = '11011010111010000', and the binary value of 10 is '1010' which appears 7 (111_2) digits back from the end of the string.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen():
        b = "1"
        yield 1
        for k in count(1):
            bk = bin(k)[2:]
            idx = b.rfind(bk)
            if idx == -1:
                yield 0
                b += "0"
            else:
                yield len(b) - idx
                b += bin(len(b) - idx)[2:]
    print(list(islice(agen(), 79))) # Michael S. Branicky, Mar 18 2022

A357433 a(1) = 1; a(2) = 2; for n > 2, a(n) is the smallest positive number not occurring earlier such that the binary string of a(n) plus the sum of all previous terms appears in the binary string concatenation of a(1)..a(n-1).

Original entry on oeis.org

1, 2, 3, 5, 12, 4, 9, 10, 11, 16, 14, 6, 7, 18, 17, 13, 15, 8, 20, 22, 24, 33, 26, 31, 21, 19, 25, 35, 30, 28, 56, 34, 36, 43, 32, 42, 37, 23, 29, 38, 27, 58, 45, 60, 46, 52, 44, 50, 72, 53, 54, 41, 65, 47, 40, 48, 66, 51, 64, 49, 57, 61, 67, 93, 77, 59, 74, 100, 75, 69, 91, 73, 83, 71, 81, 39, 82
Offset: 1

Views

Author

Scott R. Shannon, Sep 28 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 20000 terms there are twenty-five fixed points starting 3, 37, 84, 99, 103, 166.

Examples

			a(5) = 12 as a(1) + a(2) + a(3) + a(4) + 12 = 1 + 2 + 3 + 5 + 12 = 23 = 10111_2, and "10111" appears in the string concatenation of the binary values of a(1)..a(4) = "11011101".
		

Crossrefs

A352245 a(0) = 1; for n >= 1, a(n) = the decimal value of the binary number of the index of where n first appears in the concatenation of all previous binary terms. If the binary value of n has not previously appeared then a(n) = 0.

Original entry on oeis.org

1, 1, 0, 1, 0, 2, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 8, 0, 0, 6, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 20, 0, 8, 0, 0, 0, 0, 0, 6, 0, 2, 0, 0, 0, 0, 0, 0, 0, 56, 0, 26, 1, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 47, 20, 0, 71, 8, 84, 0, 110, 57, 0, 0, 0, 0, 0, 0, 0, 27, 6, 79, 155, 4, 2, 0, 0, 0, 0, 0, 0, 134
Offset: 0

Views

Author

Scott R. Shannon, Mar 09 2022

Keywords

Comments

In the first 250000 terms the longest run of consecutive 0 terms is seven, the first occurrence of which starts at a(43). It is unknown if longer runs exists. See the companion sequence A352246 for the indices where a(n) = 0.

Examples

			a(1) = 1 as the binary string concatenation up to a(0) = '1', and the binary value of 1 is '1' which appears at index 1 in the string.
a(2) = 0 as the binary string concatenation up to a(1) = '11', while the binary value of 2 is '10' which does not appear in the string.
a(3) = 1 as the binary string concatenation up to a(2) = '110', and the binary value of 3 is '11' which appears at index 1 in the string.
a(5) = 2 as the binary string concatenation up to a(4) = '11010', and the binary value of 5 is '101' which appears at index 2 in the string.
a(17) = 8 as the binary string concatenation up to a(16) = '1101010100010001000', and the binary value of 17 is '10001' which appears at index 8 in the string.
		

Crossrefs

Cf. A352246, A342303 (from end), A351753, A341766.

Programs

  • Python
    from itertools import count, islice
    def agen():
        b = "1"
        yield 1
        for k in count(1):
            bk = bin(k)[2:]
            idx = b.find(bk) + 1
            yield idx
            b += bin(idx)[2:]
    print(list(islice(agen(), 93))) # Michael S. Branicky, Mar 18 2022

A352246 Indices k where A352245(k) = 0.

Original entry on oeis.org

2, 4, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 45, 46, 47, 48, 49, 51, 54, 55, 57, 58, 59, 60, 61, 62, 63, 66, 70, 73, 74, 75, 76, 77, 78, 79, 86, 87, 88, 89, 90, 91, 96, 99, 101, 103, 107, 117, 118, 123, 126, 127, 140, 147, 151
Offset: 0

Views

Author

Scott R. Shannon, Mar 09 2022

Keywords

Comments

See A352245 for further details and examples.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen():
        b = "1"
        for k in count(1):
            bk = bin(k)[2:]
            idx = b.find(bk) + 1
            if idx == 0: yield k
            b += bin(idx)[2:]
    print(list(islice(agen(), 73))) # Michael S. Branicky, Mar 18 2022

A357377 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that |a(n) - a(n-1)| does not appear in the string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 2, 6, 10, 14, 22, 4, 12, 20, 28, 44, 8, 24, 40, 56, 18, 34, 50, 23, 39, 55, 26, 42, 58, 29, 45, 61, 31, 47, 63, 27, 43, 59, 75, 37, 53, 69, 85, 36, 52, 68, 30, 46, 62, 78, 94, 110, 33, 49, 65, 81, 97, 113, 41, 57, 73, 35, 51, 67, 105, 143, 16, 54
Offset: 0

Views

Author

Scott R. Shannon, Sep 26 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 200000 terms the only fixed points are 20, 24, 43 and 115. It is likely no more exist although this is unknown.
There are no other fixed points in the first 870000 terms. - Michael S. Branicky, Oct 05 2022

Examples

			a(12) = 25 as the concatenation of a(0)..a(11) is "013579111315171921" and |25 - a(11)| = |25 - 21| = 4 which does not appear in the concatenated string. Since a(11) contains a '2' and all other odd numbers appear in the string a(12) cannot be 23 or any even number less than 25.
a(13) = 2 as the concatenation of a(0)..a(12) is "01357911131517192125" and |2 - a(12)| = |2 - 25| = 23 which does not appear in the concatenated string.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, astr, an, mink, mindiff = [], set(), "", 0, 1, 1
        for n in count(0):
            yield an; aset.add(an); astr += str(an)
            prevan, an = an, mink
            while an + mindiff <= prevan and (an in aset or str(abs(an-prevan)) in astr): an += 1
            if an in aset or str(abs(an-prevan)) in astr:
                an = max(mink, prevan + mindiff)
                while an in aset or str(an-prevan) in astr:
                    an += 1
            while mink in aset: mink += 1
            while str(mindiff) in astr: mindiff += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, Oct 05 2022

A357449 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of a(n) plus the largest previous term does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 9, 14, 15, 16, 17, 18, 20, 12, 24, 8, 28, 26, 30, 22, 33, 11, 21, 31, 32, 36, 37, 27, 35, 41, 13, 23, 40, 44, 38, 62, 46, 66, 19, 42, 63, 65, 69, 39, 59, 60, 68, 72, 56, 57, 71, 76, 52, 53, 80, 48, 49, 55, 58, 61, 64, 83, 45, 73, 77, 81, 82, 85, 43, 50, 75, 79, 87, 51
Offset: 0

Views

Author

Scott R. Shannon, Sep 29 2022

Keywords

Comments

The main concentration of terms lies near the line a(n) = n; there are 26 fixed points in the first 100000 terms. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(9) = 9 as the concatenation of a(0)..a(8) in binary is "0110111001011010110111" and 9 plus the largest previous term = 9 + 10 = 19 = 10011_2 which does not appear in the concatenated string. Since 10 + 8 = 18 = 10010_2 appears in the concatenated string, a(9) cannot be 8.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen():
        aset, astr, an, mink = {0}, "0", 0, 1
        while True:
            yield an; k, m = mink, max(aset)
            while k in aset or bin(m+k)[2:] in astr: k += 1
            while mink in aset: mink += 1
            an = k; aset.add(an); astr += bin(an)[2:]
    print(list(islice(agen(), 77))) # Michael S. Branicky, Sep 29 2022

A360521 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that neither the binary string a(n-1) + a(n) nor the same string reversed appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 9, 7, 17, 15, 18, 14, 19, 13, 20, 12, 21, 11, 22, 26, 8, 24, 27, 37, 28, 23, 25, 39, 29, 35, 30, 34, 31, 33, 32, 36, 41, 44, 43, 42, 38, 62, 57, 70, 58, 69, 59, 68, 60, 67, 61, 66, 63, 64, 65, 71, 76, 52, 84, 72, 56, 80, 48, 88, 40, 96, 51, 77, 83, 45, 91, 81, 47, 89, 86
Offset: 0

Views

Author

Scott R. Shannon, Feb 09 2023

Keywords

Comments

As in A357082 the main concentration of terms is along the line a(n) = n, so there are numerous fixed points - there are 24 fixed points in the first 200000 terms. The sequence is conjectured to be a permutation of the positive integers.
Note that when the binary string of a(n-1) + a(n) is reversed any resulting leading 0's are retained for the string comparison.

Examples

			a(11) = 15 as the concatenation of a(0)..a(10) in binary is "0110111001011010110100111110001" and a(10) + 15 = 17 + 15 = 32 = 100000_2 which does not appear in the concatenated string, nor does its reverse "000001". Although 17 + 12 = 29 = 11101_2 does not appear in the string its reverse "10111" does, so a(11) cannot be 12. This is the first term to differ from A357082.
		

Crossrefs

Programs

Showing 1-9 of 9 results.