OFFSET
1,2
COMMENTS
PROG
(Python)
from itertools import count
from sympy import prime, nextprime
def A364824(n):
a, f, p = 2, 1, prime(n)
for i in count(1):
if a == p:
return i
a=nextprime((f:=f*a)+1)-f # Chai Wah Wu, Sep 09 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Bert Dobbelaere, Aug 09 2023
STATUS
approved