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.

A373799 Index of n-th prime in A374965.

Original entry on oeis.org

2, 5, 9, 14, 19, 22, 25, 36, 38, 43, 47, 51, 56, 65, 72, 74, 76, 97, 100, 102, 105, 107, 110, 112, 115, 122, 125, 128, 130, 238, 255, 260, 272, 284, 286, 290, 293, 296, 300, 316, 325, 331, 562, 565, 567, 575, 578, 607, 610, 612, 617, 627, 632, 649, 651, 654, 866, 875, 878
Offset: 1

Views

Author

Harvey P. Dale and N. J. A. Sloane, Jul 28 2024

Keywords

Examples

			The fifth prime in order of appearance in A374965 is A375028(5) = 751 = A374965(19), so a(5) = 19.
		

Crossrefs

Cf. A373798 (first differences), A374965, A375028.

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def A373799_gen(): # generator of terms
        a, p = 1, 3
        for i in count(1):
            if isprime(a):
                yield i
                a = p-1
            else:
                a = (a<<1)+1
            p = nextprime(p)
    A373799_list = list(islice(A373799_gen(),20)) # Chai Wah Wu, Jul 29 2024