OFFSET

2,1

EXAMPLE

3 is the smallest prime in 3, 5, 7, 11 which is the first chain of four consecutive primes whose product - 2 is prime: 3 * 5 * 7 * 11 - 2 = 1153 (prime). Hence a(4) = 3.

PROG

(PARI) pchain(p, n) = {my(pp = p, i, q); for (i=1, n-1, q = nextprime(p+1); pp *= q; p = q; ); return (pp-2); }

lista(nn) = {for (n = 2, nn, p = 3; while (! isprime(pchain(p, n)), p = nextprime(p+1); ); print1(p, ", "); ); } \\ Michel Marcus, May 18 2013

CROSSREFS

KEYWORD

nonn

AUTHOR

Joseph L. Pe, Jun 12 2003

EXTENSIONS

More terms from Michel Marcus, May 18 2013

STATUS

approved