login

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”).

Numbers n such that |n!-107| and |n!+107| are prime.
6

%I #5 May 13 2013 01:48:59

%S 3,4,5,6,7,8,80

%N Numbers n such that |n!-107| and |n!+107| are prime.

%F 5!-107=13 and 5!+107=227, so 5 is a member.

%t lst={};a=107;Do[If[PrimeQ[n!-a]&&PrimeQ[n!+a],AppendTo[lst,n]],{n,0,20^2}];lst

%o (PARI) for(n=1,106,if(ispseudoprime(abs(n!-107))&&ispseudoprime(n!+107),print1(n", "))) \\ _Charles R Greathouse IV_, Oct 05 2011

%K nonn,fini,full

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Sep 08 2008