A036780 Primes of the form n + Sum_{i=1..n} i!.
2, 5, 37, 4037923
Offset: 1
Keywords
Crossrefs
Cf. A036782.
Programs
-
Mathematica
With[{nn=40},Select[Total/@Thread[{Range[nn],Accumulate[Range[ nn]!]}], PrimeQ]] (* Harvey P. Dale, Feb 18 2018 *)
-
PARI
lista(nn) = { for (n=1, nn, if (isprime(p = sum(i=1, n, i!) + n), print1(p, ", ")););} \\ Michel Marcus, Jan 06 2014
Extensions
Definition corrected by Michel Marcus, Jan 06 2014
Comments