OFFSET
1,1
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..290 (Terms 1 through 289 were obtained using Harvey P. Dale's MMA program for A373798. For a(290), see A375028.)
N. J. A. Sloane, A Nasty Surprise in a Sequence and Other OEIS Stories, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; Slides [Mentions this sequence]
EXAMPLE
PROG
(Python)
from itertools import count, islice
from sympy import isprime, nextprime
def A373799_gen(): # generator of terms
a, p = 1, 3
for i in count(1):
if isprime(a):
yield i
a = p-1
else:
a = (a<<1)+1
p = nextprime(p)
CROSSREFS
KEYWORD
nonn
AUTHOR
Harvey P. Dale and N. J. A. Sloane, Jul 28 2024
STATUS
approved