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.

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