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.

A166342 Numbers n such that (n+2)*n!*Sum((-1)^k/k!),k=0..n+2 is prime.

This page as a plain text file.
%I A166342 #2 Oct 02 2013 16:01:16
%S A166342 2,3,4,8,13,42,64,166,573,1711
%N A166342 Numbers n such that (n+2)*n!*Sum((-1)^k/k!),k=0..n+2 is prime.
%C A166342 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 A166342 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 A166342 For n=3, a[3]=11 which is prime.
%o A166342 (PARI) z_even=1;z_odd=1;
%o A166342 for(n=1,20000,
%o A166342 if(n%2==1,
%o A166342 z_odd=(n+2)*(n-1)*z_odd+1; if((ispseudoprime(z_odd)),print(n="n)),
%o A166342 z_even=(n+2)*(n-1)*z_even-1; if((ispseudoprime(z_odd)),print(n="n))););
%Y A166342 Cf. A000255 (corresponding sequence).
%K A166342 nonn
%O A166342 1,1
%A A166342 _Mike Oakes_, Oct 12 2009