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.

A338404 Primes p in A158932 such that p = prime(k) = A158932(k) for some k.

Original entry on oeis.org

2, 3, 397217, 412193, 418927, 421163, 421501, 423763, 426077, 431797, 454859, 456367, 456523, 458993, 475529, 480989, 482393, 484733, 501451, 1003133, 1003469, 1003763, 1003819, 1003931, 1007599, 1007711, 1392851, 1393103, 1393159, 1393187, 1393229, 1393313
Offset: 1

Views

Author

Ya-Ping Lu, Oct 24 2020

Keywords

Comments

Sequence A158923, in which every term is the sum of the previous term and the average prime gap, is a "simulation" of the prime number sequence A000040. This sequence lists the terms in A158923 that match those in A000040 both in value and in position, or A158923(m) = A000040(m).
There are 68 matches found for m up to 1073741824 (prime(1073741824)=24563311309), with a(68) = 12496469849.

Crossrefs

Programs

  • PARI
    lista(nn) = {my(a = 2); for (n=1, nn, if (a == prime(n), print1(a, ", ")); a += round(log(a)););} \\ Michel Marcus, Oct 31 2020
  • Python
    from sympy import nextprime
    from math import log
    print(2)
    a_last = b_last = m = 2
    n = 1
    while m >= 2:
        a = a_last + int(log(a_last) + 0.5)
        b = nextprime(b_last)
        if a == b:
            n += 1
            print (m)
        a_last = a
        b_last = b
        m += 1
    

Formula

a(n) = A158923(m), where m is the n-th index in A158923 such that A158923(m) = A000040(m).