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.

This page as a plain text file.
%I A242568 #16 Sep 29 2014 11:26:05
%S A242568 0,1,110,1,5026,10070,362862,1,39916778,34,6227020774,25152407,
%T A242568 1307674367970,50917,355687428095966,256443711659,121645100408831962,
%U A242568 1286,51090942171709439958,111014413076599,25852016738884976639954,51704033477769953279974
%N A242568 Least number k >= 0 such that (n!+k)/(n+k) is prime.
%C A242568 a(n) <= n!-2n for all n. See A242567.
%C A242568 a(68) = 1526549.
%C A242568 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.
%H A242568 Hiroaki Yamanouchi, <a href="/A242568/b242568.txt">Table of n, a(n) for n = 3..60</a>
%e A242568 (4!+1)/(4+1) = 5 is prime. Thus, a(4) = 1.
%o A242568 (PARI) a(n)=for(k=1,5*10^6,s=(n!+k)/(n+k);if(floor(s)==s,if(ispseudoprime(s),return(k))));
%o A242568 n=1;while(n<100,print(a(n));n += 1)
%Y A242568 Cf. A242567.
%K A242568 nonn
%O A242568 3,3
%A A242568 _Derek Orr_, May 17 2014
%E A242568 a(11)-a(24) from _Hiroaki Yamanouchi_, Sep 29 2014