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.

A347313 Index of prime(n) in A347113, or -1 if that prime never appears.

Original entry on oeis.org

8, 11, 7, 20, 28, 19, 37, 51, 53, 47, 101, 116, 58, 63, 99, 81, 136, 146, 159, 153, 115, 213, 176, 197, 302, 151, 215, 223, 169, 230, 276, 274, 255, 188, 233, 318, 440, 341, 347, 359, 369, 282, 386, 396, 405, 520, 638, 460, 472, 698, 357, 492, 507, 514, 529, 535, 558, 702
Offset: 1

Views

Author

N. J. A. Sloane, Sep 06 2021

Keywords

Comments

Conjecture: every prime appears in A347113 (every number, in fact).
The graph shows three three strong lines (and many other points). Can the primes on the three lines be described in a simple way?

Crossrefs

Cf. A347113.

Programs

  • Python
    from math import gcd
    from sympy import prime
    def A347313(n):
        p = prime(n)
        i, j, nset, m = 1, 2, {1}, 2
        while True:
            k = m
            i += 1
            while k == j or gcd(k,j) == 1 or k in nset:
                k += 1
            if k == p:
                return i
            j = k+1
            nset.add(k)
            while m in nset:
                m += 1 # Chai Wah Wu, Sep 06 2021