login
Primes in A374965 in order of their occurrence.
5

%I #35 Aug 10 2024 13:02:28

%S 3,19,103,463,751,283,331,103423,313,2671,1543,1783,3823,68863,20287,

%T 733,757,407896063,2083,1093,2251,1153,2371,1213,2467,41023,2707,2803,

%U 1453,119909605576788675546376149602926591,98238463,25903,3405823,3590143,3733,14983,7603,7723,15607,65306623,537343,69151,3859801644442622798122887215978426484283282692686288680974641672159756287

%N Primes in A374965 in order of their occurrence.

%C 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

%H Harvey P. Dale, <a href="/A375028/b375028.txt">Table of n, a(n) for n = 1..289</a> [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]

%t nxt[{n_,a_}]:={n+1,If[!PrimeQ[a],2a+1,Prime[n+1]-1]}; Select[NestList[nxt, {1, 1}, 999][[;; , 2]], PrimeQ]

%o (Python)

%o from itertools import islice

%o from sympy import isprime, nextprime

%o def A375028_gen(): # generator of terms

%o a, p = 1, 3

%o while True:

%o if isprime(a):

%o yield a

%o a = p-1

%o else:

%o a = (a<<1)+1

%o p = nextprime(p)

%o A375028_list = list(islice(A375028_gen(),30)) # _Chai Wah Wu_, Jul 29 2024

%Y Cf. A374965; A050412, A052333.

%Y A373799 gives the indices where the primes appear in A374965.

%Y A373804 gives the primes sorted into increasing or5der.

%K nonn

%O 1,1

%A _Harvey P. Dale_ and _N. J. A. Sloane__, Jul 28 2024