OFFSET
1,1
EXAMPLE
a(10) = 453601 = 10!/8 + 1, as 10!/10 + 1 and 10!/9 + 1 are both composite.
MATHEMATICA
Table[SelectFirst[Reverse[n!/Range[n]+1], PrimeQ], {n, 30}]/.(Missing[ "NotFound"] -> 0) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 15 2019 *)
PROG
(PARI) a(n)=for (i=1, n, if(isprime(n!/(n-i+1)+1), return((n!/(n-i+1)+1))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 26 2004
EXTENSIONS
Corrected and extended by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004
STATUS
approved