OFFSET
3,5
EXAMPLE
7th primorial is surrounded by {510529,510481} primes in {19,71} distances of which the smaller is 19=a(7).
MAPLE
with(numtheory): [seq(min(nextprime(product(ithprime(j), j=1..n))-product(ithprime(j), j= >1..n), product(ithprime(j), j=1..n)-prevprime(product(ithprime(j), j=1..n >))), n=3..50)];
MATHEMATICA
dnp[n_]:=Module[{a=NextPrime[n, -1], b=NextPrime[n]}, Min[n-a, b-n]]; dnp/@ FoldList[Times, Prime[Range[50]]] (* Harvey P. Dale, Jul 11 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 23 2001
STATUS
approved