OFFSET
0,7
COMMENTS
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..1000
EXAMPLE
a(3) = 1 because 1 + prime(3)#/1 = 1 + 2*3*5 = 31 and 31 is a prime;
a(6) = 2 because 2 + prime(6)#/2 = 2 + 2*3*5*7*11*13/2 = 15017 and that is a prime;
a(7) = 5 because 5 + prime(7)#/5 = 5 + 2*3*5*7*11*13*17/5 = 102107 which is a prime; etc.
MATHEMATICA
f[n_] := Block[{d = 1, p = Fold[Times, 1, Prime@ Range@ n]}, While[ !PrimeQ[d + p/d], d++]; d]; Array[f, 90]
PROG
(PARI) a(n)=my(P=vecprod(primes(n))); for(d=1, P, if(P%d==0 && ispseudoprime(d+P/d), return(d))) \\ Charles R Greathouse IV, Nov 27 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski and Robert G. Wilson v, Nov 26 2017
STATUS
approved