Subfactorial

Subfactorial[n]
gives the number of permutations of n objects that leave no object fixed.

DetailsDetails

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • For non-integer n, the numerical value of Subfactorial[n] is given by Gamma[n+1, -1]/E.
  • Subfactorial can be evaluated to arbitrary numerical precision.
  • A permutation in which no object appears in its natural place is called a derangement.
  • Subfactorial automatically threads over lists.
  • Subfactorial[0] gives 1.
New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »