The subfactorial of an integer
, often denoted by
is equal to the number of
derangements of
objects, i.e., the number of permutations with no fixed points.
For example , because there are 9 derangments of the set , namely , , , , ,
, , , and .
Three formulas for :
where the last formula holds for
.
The first subfactorials are 1, 0,
1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734 more terms
Pictorial representation of remainders (mod 2, 3, ...,11) frequency. For a table of values and more details
click here
A graph displaying how many subfactorials are multiples of the primes
p from 2 to 71. In black the ideal line 1/
p.