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

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

A355715 a(0) = 0; for n > 0, a(n) is the total number of binary bits that n has in common with all previous terms.

Original entry on oeis.org

0, 0, 2, 1, 3, 2, 7, 8, 8, 9, 16, 15, 17, 17, 18, 19, 32, 35, 39, 42, 33, 36, 40, 40, 50, 50, 57, 57, 50, 49, 53, 54, 92, 91, 94, 93, 85, 87, 89, 90, 101, 105, 106, 113, 103, 109, 108, 116, 143, 146, 144, 149, 145, 151, 146, 153, 161, 169, 161, 170, 159, 169, 158, 170, 184, 192, 187, 194, 181
Offset: 0

Views

Author

Scott R. Shannon, Jul 15 2022

Keywords

Crossrefs

Formula

a(1) = 0 as a(0) = 0, and 0 shares no bits in common with 1.
a(2) = 2 as a(0) = 0, a(1) = 0, and 2 = 10_2 has the 0-bit in common with both previous terms.
a(3) = 1 as a(2) = 2 = 10_2 and 3 = 11_2 shares a 1-bit in common with 2.
a(6) = 7 as a(0) = 0, a(1) = 0, a(2) = a(5) = 2 = 10_2, a(4) = 3 = 11_2 and 6 = 110_2 shares four 0-bits and three 1-bits, seven bits in all, with these previous terms.
Showing 1-3 of 3 results.