|
|
A354748
|
|
a(n) is the prime reached after A354747(n) steps when repeatedly applying the map x -> 3*x+2 to 2*n-1, or 0 if no prime is ever reached.
|
|
2
|
|
|
5, 11, 17, 23, 29, 107, 41, 47, 53, 59, 197, 71, 233, 83, 89, 863, 101, 107, 113, 359, 2480057, 131, 137, 431, 149, 467, 4373, 167, 173, 179, 557, 191, 197, 5507, 1889, 647, 1997, 227, 233, 239, 2213, 251, 257, 263, 269, 827, 281, 863, 293, 2699, 2753, 311, 317
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Is a(100943) = 0?
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|