cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A242568 Least number k >= 0 such that (n!+k)/(n+k) is prime.

Original entry on oeis.org

0, 1, 110, 1, 5026, 10070, 362862, 1, 39916778, 34, 6227020774, 25152407, 1307674367970, 50917, 355687428095966, 256443711659, 121645100408831962, 1286, 51090942171709439958, 111014413076599, 25852016738884976639954, 51704033477769953279974
Offset: 3

Views

Author

Derek Orr, May 17 2014

Keywords

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.

Examples

			(4!+1)/(4+1) = 5 is prime. Thus, a(4) = 1.
		

Crossrefs

Cf. A242567.

Programs

  • 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)

Extensions

a(11)-a(24) from Hiroaki Yamanouchi, Sep 29 2014