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.

This page as a plain text file.
%I A338404 #16 Nov 05 2020 15:46:29
%S A338404 2,3,397217,412193,418927,421163,421501,423763,426077,431797,454859,
%T A338404 456367,456523,458993,475529,480989,482393,484733,501451,1003133,
%U A338404 1003469,1003763,1003819,1003931,1007599,1007711,1392851,1393103,1393159,1393187,1393229,1393313
%N A338404 Primes p in A158932 such that p = prime(k) = A158932(k) for some k.
%C A338404 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).
%C A338404 There are 68 matches found for m up to 1073741824 (prime(1073741824)=24563311309), with a(68) = 12496469849.
%F A338404 a(n) = A158923(m), where m is the n-th index in A158923 such that A158923(m) = A000040(m).
%o A338404 (Python)
%o A338404 from sympy import nextprime
%o A338404 from math import log
%o A338404 print(2)
%o A338404 a_last = b_last = m = 2
%o A338404 n = 1
%o A338404 while m >= 2:
%o A338404     a = a_last + int(log(a_last) + 0.5)
%o A338404     b = nextprime(b_last)
%o A338404     if a == b:
%o A338404         n += 1
%o A338404         print (m)
%o A338404     a_last = a
%o A338404     b_last = b
%o A338404     m += 1
%o A338404 (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
%Y A338404 Cf. A000040, A158923, A338396.
%K A338404 nonn
%O A338404 1,1
%A A338404 _Ya-Ping Lu_, Oct 24 2020