Subfactorial
Subfactorial[n]
gives the number of permutations of n objects that leave no object fixed.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- For noninteger 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. The subfactorial counts the number of derangements.
- Subfactorial automatically threads over lists. »
- Subfactorial[0] gives 1.
- Subfactorial can be used with CenteredInterval objects. »
Examples
open allclose allBasic Examples (5)
Plot the values on a log scale over a subset of the reals:
Plot over a subset of the complexes:
Series expansion at the origin:
Series expansion at Infinity:
Scope (28)
Numerical Evaluation (7)
The precision of the output tracks the precision of the input:
Evaluate efficiently at high precision:
Subfactorial automatically threads over lists:
Compute the elementwise values of an array using automatic threading:
Or compute the matrix Subfactorial function using MatrixFunction:
Subfactorial can be used with CenteredInterval objects:
Specific Values (5)
Values of Subfactorial at fixed points:
Find a value of for which the real part of Subfactorial[x] is equal to 5:
Visualization (2)
Plot the absolute value of Subfactorial:
Plot the real part of Subfactorial[z]:
Plot the imaginary part of Subfactorial[z]:
Function Properties (6)
Real domain of Subfactorial:
Subfactorial is not an analytic function on :
In fact, it is singular and discontinuous everywhere on the reals:
The reason is that it is only real valued at isolated points:
However, it is analytic in the complex plane:
The imaginary part of Subfactorial is not injective:
The imaginary part of Subfactorial is not surjective:
The real part of Subfactorial is neither non-negative nor non-positive:
The real part of Subfactorial is neither convex nor concave:
Differentiation (2)
Series Expansions (3)
Recurrence Identities and Simplifications (3)
On the positive integers, Subfactorial[n]==Round[n!/E]:
Applications (1)
Properties & Relations (5)
Subfactorial[n] is given by :
Recurrence relations satisfied by Subfactorial:
Subfactorial can be represented as a DifferenceRoot:
FindSequenceFunction can recognize the Subfactorial sequence:
The exponential generating function for Subfactorial:
Text
Wolfram Research (2007), Subfactorial, Wolfram Language function, https://reference.wolfram.com/language/ref/Subfactorial.html.
CMS
Wolfram Language. 2007. "Subfactorial." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Subfactorial.html.
APA
Wolfram Language. (2007). Subfactorial. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Subfactorial.html