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 #8 Nov 15 2014 09:24:18
%S 3,4,5,12,13,19,65,90,123,211,281,459
%N Numbers n such that Sum_{k=1..n} k! - 2 is prime.
%C There are no further terms in this sequence because for all n >= 466 (Sum_{k=1..n} k!) - 2 is divisible by 467. [From _Dmitry Kamenetsky_, Feb 10 2009]
%e 1! + 2! + 3! + 4! + 5! -2 = 1 + 2 + 6 + 24 + 120 - 2 = 151 which is a prime.
%t Do[If[PrimeQ[Sum[m!, {m, 1, n}]-2], Print[n]], {n, 1, 2500}]
%t Flatten[Position[Accumulate[Range[500]!]-2,_?PrimeQ]] (* _Harvey P. Dale_, Nov 15 2014 *)
%K nonn,fini,full
%O 1,1
%A _Robert G. Wilson v_, Jul 05 2000