OFFSET
1,1
COMMENTS
Is a(100943) = 0?
If not 0, a(100943) >= 10^10000. - Michael S. Branicky, Jun 07 2022
PROG
(PARI) a(n) = my(x=2*n-1); while(1, x=3*x+2; if(ispseudoprime(x), return(x)))
(Python)
from sympy import isprime
def f(x): return 3*x + 2
def a(n):
fn, c = f(2*n-1), 1
while not isprime(fn): fn, c = f(fn), c+1
return fn
print([a(n) for n in range(1, 54)]) # Michael S. Branicky, Jun 07 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jun 06 2022
STATUS
approved