OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1019
EXAMPLE
The initial rows, prefixed by prime(n), are:
[2]: 3, 3,
[3]: 5,
[5]: 7, 11, 29,
[7]: 13, 31, 127, 727,
[11]: 13, 17, 131, 5051, 3628811,
[13]: 19, 37, 733,
[17]: 19, 23, 41, 137, 362897, 39916817,
[19]: 43, 139, 739, 5059, 3628819, 39916819, 87178291219,
[23]: 29, 47, 743, 40343, 362903, 20922789888023,
[29]: 31, 53, 149, 39916829, 479001629, 2432902008176640029,
[31]: 37, 151, 751, 40351, 362911, 39916831, 355687428096031, 51090942171709440031, 1124000727777607680031,
[37]: 43, 61, 157, 757, 5077, 40357, 39916837, 6402373705728037, 2432902008176640037, 51090942171709440037, 8683317618811886495518194401280000037,
...
PROG
(PARI)
forprime(p=2, 59, print1([p], ": "); for(k=0, p, if(ispseudoprime(p+k!), print1(p+k!, ", "))); print())
(Python)
from sympy import isprime, prime
from itertools import count, islice
def agen(): # generator of terms
for n in count(1):
pn, fk = prime(n), 1
for k in range(1, pn+1):
if isprime(pn + fk): yield pn + fk
fk *= k
print(list(islice(agen(), 51))) # Michael S. Branicky, Apr 16 2022
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Editors of OEIS, based on a suggestion from Hemjyoti Nath, Apr 16 2022
STATUS
approved