OFFSET
0,1
COMMENTS
If a(n) = 0, all numbers m!/n! - 1 for integer m > n are composite.
Up to n = 2500, a(n) > 0.
LINKS
Lei Zhou, Table of n, a(n) for n = 0..2500
EXAMPLE
n = 1: 2!/1! - 1 = 1 is not prime, 3!/1! - 1 = 5 is prime. So a(1) = 3;
n = 6: 7!/6! - 1 = 6, 8!/6! - 1 = 55, 9!/6! - 1 = 503. 6 and 55 are not prime. 503 is prime. So a(6) = 9.
MATHEMATICA
Table[i = n; a = n; While[! PrimeQ[a - 1], i++; a = a*i]; i, {n, 1, 67}]
PROG
(PARI) a(n) = {m = n; while(! isprime(m!/n! -1), m++); m; } \\ Michel Marcus, Mar 06 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Lei Zhou, Feb 27 2014
STATUS
approved