OFFSET
1,1
COMMENTS
!n is a subfactorial number (A000166).
The corresponding k are {0, 2, 3, 4, 5, 7, 9, 16, 88, ...}. The next prime of this sequence contains 135 digits.
EXAMPLE
The prime 3709 = 2*!7 + 1 = 2*1854 + 1 is in the sequence.
MAPLE
with(numtheory): f:=n->sum(n!*(((-1)^k)*1/k!), k=0..n):for n from 1 to 150 do: if type(2*f(n)+1, prime) = true then printf(`%d, `, 2*f(n)+1):else fi:od:
MATHEMATICA
a={}; Do[p= 2* Subfactorial[n]+1; If[PrimeQ[p], AppendTo[a, p]], {n, 0, 800}]; Print[a];
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 26 2012
STATUS
approved