OFFSET
1,1
COMMENTS
Sequences A050412 and A052333 suggest that it is possible that the present sequence has only finitely many terms. - N. J. A. Sloane, Jul 29 2024
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..289 [This b-file ends with a(289) = 838951. Thanks to the work of Lucas A. Brown (see A050412), we can now say that the next term a(290) is the 102410-digit prime 104917*2^340181 - 1. Of course this is too large to include in a b-file. - N. J. A. Sloane, Jul 31 2024]
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]
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[!PrimeQ[a], 2a+1, Prime[n+1]-1]}; Select[NestList[nxt, {1, 1}, 999][[;; , 2]], PrimeQ]
PROG
(Python)
from itertools import islice
from sympy import isprime, nextprime
def A375028_gen(): # generator of terms
a, p = 1, 3
while True:
if isprime(a):
yield a
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