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.

A353732 Inverse permutation to A352808: a(n) = index where n appears in A352808.

Original entry on oeis.org

0, 1, 2, 6, 3, 4, 10, 11, 5, 7, 8, 18, 12, 19, 32, 44, 9, 16, 14, 24, 13, 17, 15, 45, 20, 21, 50, 56, 51, 52, 62, 63, 22, 25, 26, 27, 28, 29, 33, 40, 23, 30, 34, 78, 48, 70, 79, 122, 36, 64, 38, 84, 37, 71, 82, 98, 83, 85, 94, 123, 92, 148, 134, 210, 31, 41, 35, 46, 42, 47, 43, 72, 49, 53, 57, 73, 54, 76, 128, 162, 39, 65, 58, 96, 55, 68, 60
Offset: 0

Views

Author

N. J. A. Sloane, May 17 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        A352808lst = [0, 1]; A352808set = {0, 1}; yield from [0, 1]
        mink = 2
        for n in count(2):
            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: yield A352808lst.index(mink); mink += 1
    print(list(islice(agen(), 87))) # Michael S. Branicky, May 17 2022