cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100015 Subfactorial primes: primes of the form !k + 1 or !k - 1. Subfactorial or rencontres numbers or derangements !k = A000166(k).

This page as a plain text file.
%I A100015 #18 Jul 28 2025 08:11:24
%S A100015 2,3,43,481066515733,130850092279663
%N A100015 Subfactorial primes: primes of the form !k + 1 or !k - 1. Subfactorial or rencontres numbers or derangements !k = A000166(k).
%C A100015 No additional terms through k <= 2000. - _Harvey P. Dale_, Feb 17 2023
%D A100015 R. A. Brualdi and H. J. Ryser: Combinatorial Matrix Theory, 1992, Section 7.2, p. 202.
%D A100015 H. J. Ryser, Combinatorial Mathematics. Mathematical Association of America, Carus Mathematical Monograph 14, 1963, p. 23.
%H A100015 R. M. Dickau, <a href="http://mathforum.org/advanced/robertd/derangements.html">Derangement diagrams</a>.
%H A100015 H. Fripertinger, <a href="http://webdb.uni-graz.at/~fripert/fga/k1recontre.html">The Recontre Numbers</a>, an online calculator.
%H A100015 Mehdi Hassani, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Hassani/hassani5.html">Derangements and Applications</a>, Journal of Integer Sequences, Vol. 6 (2003), #03.1.2
%e A100015 a(1) = 2 because !0 = !2 = 1, so !0 + 1 = !2 + 1 = 2.
%e A100015 a(5) = 130850092279663 because the 5th subfactorial prime is !17 - 1 = 130850092279664 - 1 = 130850092279663.
%t A100015 Select[Union[Flatten[Table[Subfactorial[n]+{1,-1},{n,20}]]],PrimeQ] (* _Harvey P. Dale_, Feb 17 2023 *)
%Y A100015 Cf. A000166.
%K A100015 nonn
%O A100015 1,1
%A A100015 _Jonathan Vos Post_, Nov 18 2004