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.

This page as a plain text file.
%I A373799 #43 Oct 20 2024 23:58:20
%S A373799 2,5,9,14,19,22,25,36,38,43,47,51,56,65,72,74,76,97,100,102,105,107,
%T A373799 110,112,115,122,125,128,130,238,255,260,272,284,286,290,293,296,300,
%U A373799 316,325,331,562,565,567,575,578,607,610,612,617,627,632,649,651,654,866,875,878
%N A373799 Index of n-th prime in A374965.
%H A373799 N. J. A. Sloane, <a href="/A373799/b373799.txt">Table of n, a(n) for n = 1..290</a> (Terms 1 through 289 were obtained using _Harvey P. Dale_'s MMA program for A373798. For a(290), see A375028.)
%H A373799 N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=3RAYoaKMckM">A Nasty Surprise in a Sequence and Other OEIS Stories</a>, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; <a href="https://sites.math.rutgers.edu/~zeilberg/expmath/sloane85BD.pdf">Slides</a> [Mentions this sequence]
%e A373799 The fifth prime in order of appearance in A374965 is A375028(5) = 751 = A374965(19), so a(5) = 19.
%o A373799 (Python)
%o A373799 from itertools import count, islice
%o A373799 from sympy import isprime, nextprime
%o A373799 def A373799_gen(): # generator of terms
%o A373799     a, p = 1, 3
%o A373799     for i in count(1):
%o A373799         if isprime(a):
%o A373799             yield i
%o A373799             a = p-1
%o A373799         else:
%o A373799             a = (a<<1)+1
%o A373799         p = nextprime(p)
%o A373799 A373799_list = list(islice(A373799_gen(),20)) # _Chai Wah Wu_, Jul 29 2024
%Y A373799 Cf. A373798 (first differences), A374965, A375028.
%K A373799 nonn
%O A373799 1,1
%A A373799 _Harvey P. Dale_ and _N. J. A. Sloane_, Jul 28 2024