|
|
A215913
|
|
Primes of the form 2*!n-1.
|
|
0
|
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
!n is a subfactorial number (A000166). The corresponding n are {3, 4, 12, 13, 97,...}.
|
|
LINKS
|
|
|
EXAMPLE
|
The prime 17 = 2* !4 - 1 = 2*9 -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
|
|
|
STATUS
|
approved
|
|
|
|