Factorial
Factorial, denoted by n!, is a function defined for non-negative integers n as the product of all positive integers up to n. That is, n! = 1 × 2 × ... × n, with 0! defined as 1. For example, 5! = 120. The factorial satisfies the recurrence n! = n × (n−1)!, with the base case 0! = 1.
In mathematics, factorial is used to count arrangements and selections of objects. It appears in formulas for
Extension to non-integer values is provided by the gamma function, Γ(z), which satisfies Γ(n+1) = n! for
Factorials grow very rapidly with n. For large n, Stirling’s approximation provides n! ~ sqrt(2πn) (n/e)^n, giving
Related concepts include the double factorial n!!, and the rising and falling factorials, which generalize products