OFFSET
1,1
FORMULA
a(n)=nextprime(2*n!+1)-2*n!, where nextprime is A151800.
EXAMPLE
a(4) = 5 because 2*4!+1=49, the next prime is 51 and the difference between 53 and 48 is 13.
MATHEMATICA
Do[If[PrimeQ[NextPrime[2*n!+1]-2*n! ], Print[n]], {n, 100}]
f[x_]:=Module[{n=2x!}, NextPrime[n+1]-n]
f/@Range[60] (* Harvey P. Dale, Feb 14 2011 *)
PROG
(PARI) vector(100, n, nextprime(2*n!+2)-2*n!) \\ Charles R Greathouse IV, Feb 14 2011
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Maciej Ulas (maciejulas(AT)poczta.onet.pl), Apr 25 2003
STATUS
approved