login
A242568
Least number k >= 0 such that (n!+k)/(n+k) is prime.
2
0, 1, 110, 1, 5026, 10070, 362862, 1, 39916778, 34, 6227020774, 25152407, 1307674367970, 50917, 355687428095966, 256443711659, 121645100408831962, 1286, 51090942171709439958, 111014413076599, 25852016738884976639954, 51704033477769953279974
OFFSET
3,3
COMMENTS
a(n) <= n!-2n for all n. See A242567.
a(68) = 1526549.
Since 2 is prime, we see that (n!+k)/(n+k) = 2 when k = n!-2n, which is an integer. Thus, a(n) will always be nonzero. However, it is uncertain whether there are smaller k-values besides n!-2n.
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 3..60
EXAMPLE
(4!+1)/(4+1) = 5 is prime. Thus, a(4) = 1.
PROG
(PARI) a(n)=for(k=1, 5*10^6, s=(n!+k)/(n+k); if(floor(s)==s, if(ispseudoprime(s), return(k))));
n=1; while(n<100, print(a(n)); n += 1)
CROSSREFS
Cf. A242567.
Sequence in context: A287469 A266217 A229084 * A278865 A281286 A278739
KEYWORD
nonn
AUTHOR
Derek Orr, May 17 2014
EXTENSIONS
a(11)-a(24) from Hiroaki Yamanouchi, Sep 29 2014
STATUS
approved