Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Discrete Mathematics > Combinatorial Functions >
Mathematica > Mathematics and Algorithms > Mathematical Functions > Integer Functions > Combinatorial Functions >

Factorial (!)

n!
gives the factorial of n.
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • For non-integer n, the numerical value of n! is given by Gamma[1+n].
  • For integers and half integers, Factorial automatically evaluates to exact values.
  • Factorial can be evaluated to arbitrary numerical precision.
Evaluate for large arguments:
Evaluate for half-integer arguments:
Plot the factorial function:
Evaluate numerically for complex arguments:
Factorial threads element-wise over lists:
Series expansion at infinity (Stirling's approximation):
Series at n=1:
Evaluate to high precision:
The precision of the output tracks the precision of the input:
Infinite arguments give symbolic results:
Factorial allows derivatives:
Make a table of half-integer factorials:
Number of permutations of 6 elements:
Plot of the absolute value of Factorial in the complex plane:
Find the asymptotic expansion of ratios of factorials:
Volume of an n-dimensional unit hypersphere:
Low-dimensional cases:
Plot the volume of the unit hypersphere as a function of dimension:
Find the series expansion at -Infinity:
Use FullSimplify to simplify expressions involving Factorial:
Compute a generating function sum involving Factorial:
Compute numerical sums involving Factorial:
The generating function is divergent:
Use regularization to obtain a closed form generating function:
Generating function as a formal series:
Some integrals can be done:
Product of factorials:
Large arguments can give results too large to be computed explicitly, even approximately:
Smaller values work:
Machine-number inputs can give high-precision results:
Find the numbers of digits 0 through 9 in 100000!:
Nested factorials over the complex plane:
Plot Factorial at infinity:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team