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.

A364824 Index of prime(n) in A067836, or -1 if prime(n) does not occur in it.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 9, 12, 13, 10, 19, 14, 20, 16, 26, 42, 18, 25, 11, 15, 17, 43, 118, 33, 24, 31, 29, 212, 40, 68, 30, 98, 22, 45, 34, 109, 28, 39, 21, 23, 46, 143, 27, 35, 37, 55, 47, 123, 58, 90, 132, 32, 139, 91, 41, 44, 38, 52, 36, 77, 54, 48, 53, 83, 51
Offset: 1

Views

Author

Bert Dobbelaere, Aug 09 2023

Keywords

Comments

All terms in A067836 are distinct, making this sequence defined.
If the conjecture holds that A067836 contains only primes, then a(A062894(n)) = n.
If all primes eventually occur in A067836, then all terms in this sequence are positive and A062894(a(n)) = n.

Crossrefs

Programs

  • Python
    from itertools import count
    from sympy import prime, nextprime
    def A364824(n):
        a, f, p = 2, 1, prime(n)
        for i in count(1):
            if a == p:
                return i
            a=nextprime((f:=f*a)+1)-f # Chai Wah Wu, Sep 09 2023