Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Jul 30 2014 08:16:32
%S 1,2,0,4,25,42,49,88,207,170,121,12,377,938,285,688,391,558,703,1780,
%T 609,682,713,2328,3275,1066,1593,28,1943,6690,3317,4064,2607,1258,
%U 3395,2196,4847,38,1677,3880,2173,42,4171,3124,2115,10994,4747,11184,2597,4150,3111,14092,2809,3834,12265,3976,8493,6206,16697,17580,16531,47678,8253,17344,4355,12738,18961,4964,5727,9170,9869,61704,7373
%N Least number k >= 0 such that (n!+k)/n is prime.
%C a(n) = M*n for some integer M >= 0.
%C a(n) = n times least m >= 0 such that (n-1)!+m is prime. - _Jens Kruse Andersen_, Jul 30 2014
%H Jens Kruse Andersen, <a href="/A245695/b245695.txt">Table of n, a(n) for n = 1..2001</a>
%F a(n) = n*A033932(n-1), except a(3) = 0 where A033932 demands positive values. - _Jens Kruse Andersen_, Jul 30 2014
%e (4!+0)/4 = 6 is not prime.
%e (4!+1)/4 = 25/4 is not prime.
%e (4!+2)/4 = 26/4 is not prime.
%e (4!+3)/4 = 27/4 is not prime.
%e (4!+4)/4 = 7 is prime. Thus a(4) = 4.
%o (PARI)
%o a(n)=for(k=0,10^6,s=(n!+k)/n;if(floor(s)==s,if(ispseudoprime(s),return(k))))
%o n=1;while(n<100,print1(a(n),", ");n++)
%Y Cf. A033932, A245696, A245697.
%K nonn
%O 1,2
%A _Derek Orr_, Jul 29 2014