OFFSET
0,5
FORMULA
a(n) = 0 for n in A002981. - Michel Marcus, Oct 10 2019
EXAMPLE
a(5) = 6 because 5! + 6 + 1 = 127 is prime.
MATHEMATICA
a={}; Do[k = 0; While[ !PrimeQ[n! + k + 1], k++ ]; AppendTo[a, k], {n, 0, 70} ]; a
ld[n_]:=Module[{f=n!}, NextPrime[f]-f-1]; Array[ld, 70, 0] (* Harvey P. Dale, Jul 13 2014 *)
PROG
(PARI) a(n) = my(k=0); while (!isprime(n!+k+1), k++); k; \\ Michel Marcus, Oct 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 06 2011
STATUS
approved