This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Subfactorial

Subfactorial[n]
gives the number of permutations of n objects that leave no object fixed.
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • Subfactorial can be evaluated to arbitrary numerical precision.
  • A permutation in which no object appears in its natural place is called a derangement.
New in 6