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 #2 Oct 02 2013 16:01:16
%S 2,3,4,8,13,42,64,166,573,1711
%N Numbers n such that (n+2)*n!*Sum((-1)^k/k!),k=0..n+2 is prime.
%C No further terms up to n=20000. The sequence a[n]=(n+2)*n!*Sum((-1)^k/k!),k=0..n+2 is A000255.
%F n is an index of the sequence a[n]=(n+2)*n!*Sum((-1)^k/k!),k=0..n+2 such that a[n] is prime.
%e For n=3, a[3]=11 which is prime.
%o (PARI) z_even=1;z_odd=1;
%o for(n=1,20000,
%o if(n%2==1,
%o z_odd=(n+2)*(n-1)*z_odd+1; if((ispseudoprime(z_odd)),print(n="n)),
%o z_even=(n+2)*(n-1)*z_even-1; if((ispseudoprime(z_odd)),print(n="n))););
%Y Cf. A000255 (corresponding sequence).
%K nonn
%O 1,1
%A _Mike Oakes_, Oct 12 2009