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.

A353731 a(n) = index where prime(n) appears in A352808.

Original entry on oeis.org

2, 6, 4, 11, 18, 19, 16, 24, 45, 52, 63, 29, 30, 78, 122, 71, 123, 148, 46, 72, 53, 162, 96, 66, 100, 161, 243, 212, 194, 186, 394, 75, 86, 110, 114, 177, 204, 111, 254, 295, 273, 274, 494, 124, 167, 386, 338, 642, 339, 410, 347, 650, 351, 762, 159, 180, 195, 250, 191, 208, 225, 270, 284, 595, 340, 689, 290, 238, 732, 730, 258, 651, 696, 624, 749, 1062, 271, 311, 300, 326, 666, 625, 1006, 634, 1007, 1050, 269, 738, 759, 970, 898, 1443, 1122, 1123, 1139, 1570, 1483
Offset: 1

Views

Author

N. J. A. Sloane, May 17 2022

Keywords

Comments

Here prime(n) means the n-th prime in 2, 3, 5, 7, ..., not the n-th term of A352808 that happens to be a prime.

Crossrefs

Programs

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

Formula

a(n) = k if A352808(k) = prime(n). - Michael S. Branicky, May 17 2022