login

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”).

A100015
Subfactorial primes: primes of the form !n + 1 or !n - 1. Subfactorial or rencontres numbers or derangements !n = A000166.
2
2, 3, 43, 481066515733, 130850092279663
OFFSET
1,1
COMMENTS
No additional terms through n <= 2000. (* Harvey P. Dale, Feb 17 2023 *)
REFERENCES
R. A. Brualdi and H. J. Ryser: Combinatorial Matrix Theory, 1992, Section 7.2, p. 202.
H. J. Ryser, Combinatorial Mathematics. Mathematical Association of America, Carus Mathematical Monograph 14, 1963, p. 23.
LINKS
R. M. Dickau, Derangement diagrams.
H. Fripertinger, The Recontre Numbers, an online calculator.
Mehdi Hassani, Derangements and Applications, Journal of Integer Sequences, Vol. 6 (2003), #03.1.2
EXAMPLE
a(5) = 130850092279663 because the 5th subfactorial prime is !17 - 1 = 130850092279664 - 1 = 130850092279663. a(1) = 2 because !0 = !2 = 1, so !0 + 1 = !2 + 1 = 2.
MATHEMATICA
Select[Union[Flatten[Table[Subfactorial[n]+{1, -1}, {n, 20}]]], PrimeQ] (* Harvey P. Dale, Feb 17 2023 *)
CROSSREFS
Cf. A000166.
Sequence in context: A062581 A077520 A230061 * A317672 A352003 A356047
KEYWORD
nonn
AUTHOR
Jonathan Vos Post, Nov 18 2004
STATUS
approved