

A288212


Start with 2n, and if 2n+1 is composite, multiply by the smallest factor of 2n+1; if that number plus 1 is composite, multiply by the smallest factor of that number plus 1; continue until you have a number where z+1 is prime; this is the final z+1, or 0 if sequence diverges.


0



3, 5, 7, 1321, 11, 13, 43, 17, 19, 61, 23, 1321, 79, 29, 31, 97, 3571, 37, 571, 41, 43, 4621, 47, 337, 151, 53, 271, 21217561, 59, 61, 47059, 29761, 67, 1021, 71, 73, 223, 6917, 79, 241, 83, 421, 6221671, 89, 631, 277, 23971, 97, 1471, 101, 103, 313, 107, 109, 331
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

a(126) is unknown; it's known to either be 0 or have more than 152 digits.


LINKS

Table of n, a(n) for n=1..55.


EXAMPLE

a(17) = 3571 because:
34+1=35 is composite, smallest prime factor 5, 34*5=170
170+1=171 is composite, smallest prime factor 3, 170*3=510
510+1=511 is composite, smallest prime factor 7, 510*7=3570
3570+1=3571 is prime.


PROG

(PARI) a(n) = {my(x = 2*n); while (! isprime(x+1), x = x*vecmin(factor(x+1)[, 1]); ); x+1; } \\ Michel Marcus, Jun 07 2017


CROSSREFS

Cf. A152466 (sequence that if it terminates with a number a where a+1 is prime, the final prime is a(126) of this sequence.)
Sequence in context: A065824 A191546 A069463 * A273010 A073691 A110336
Adjacent sequences: A288209 A288210 A288211 * A288213 A288214 A288215


KEYWORD

nonn


AUTHOR

J. Lowell, Jun 06 2017


EXTENSIONS

More terms from Michel Marcus, Jun 07 2017


STATUS

approved



