OFFSET
1,1
COMMENTS
!k is a subfactorial number (A000166).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
389 is in the sequence because !3 + !8 + !9 = 2 + 14833 + 133496 = 148331 is prime.
MAPLE
with(numtheory):f:=n->sum(n!*(((-1)^k)*1/k!), k=0..n):for n from 0 to 400 do:l:=length(n):n0:=n:s:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+f(u): od: if
type(s, prime)=true then printf(`%d, `, n):else fi : od:
MATHEMATICA
subf[n_]:=n!Sum[(-1)^k/k!, {k, 0, n}]; Select[Range[300], PrimeQ[Total[ subf/@ IntegerDigits[#]]]&] (* Harvey P. Dale, Oct 03 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Dec 26 2010
STATUS
approved