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.

A354142 a(n) = smallest number missing from A352808 after A352808(n) has been found.

Original entry on oeis.org

1, 2, 3, 3, 3, 3, 6, 6, 6, 6, 7, 11, 11, 11, 11, 11, 11, 11, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 23, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 30, 30, 30, 30, 30, 30, 31, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43
Offset: 0

Views

Author

N. J. A. Sloane, May 18 2022

Keywords

Examples

			A352808 (with offset 0) begins 0,1,2,4,5,8; after A352808(0) = 0 has been found, the smallest missing number is 1, so a(0) = 1; after A352808(5) = 8 has been found, the smallest missing number is 3, so a(5) = 3.
		

Crossrefs

Cf. A352808.

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        A352808lst, A352808set, mink = [0], {0}, 1
        for n in count(1):
            yield mink
            ahalf, k = A352808lst[n//2], mink
            while k in A352808set or k&ahalf: k += 1
            A352808lst.append(k); A352808set.add(k)
            while mink in A352808set: mink += 1
    print(list(islice(agen(), 78))) # Michael S. Branicky, May 18 2022