# Factorial

• Natural numbers: $$n$$, $$k$$
Real numbers: $$x$$
Factorial of $$n$$: $$n!$$
Gamma function: $$\Gamma \left( x \right)$$
1. The factorial of a non-negative integer $$n$$ is called the product of all positive integers less than or equal to the number $$n.$$ The factorial of $$n$$ is denoted as $$n!$$
$$n! =$$ $$1 \cdot 2 \cdot 3 \ldots \left( {n – 1} \right) \cdot n$$
2. factorial of zero by definition is equal to$$1:$$ $$0! = 1$$
3. Factorials of the numbers $$1-10$$
4. Recursive formula $$\left( {n + 1} \right)! = n! \cdot \left( {n + 1} \right)$$
5. Extension of the factorial function to non-negative real numbers
The factorial of a non-negative real number $$x$$ is expressed through the gamma function by the formula $$x! = \Gamma \left( {x + 1} \right),$$ which allows to calculate the factorial of any real numbers $$x \ge 0$$.
6. Rate of increase
The factorial function increases faster than the exponential function. The inequality $$n! \gt \exp \left( n \right)$$ holds for all $$n \ge 6$$. When $$n \ge 1,$$ the following relation is valid: $$n \le n! \le {n^n}.$$
7. Stirling formula
For large $$n$$ the approximating factorial value can be determined by the Stirling formula:
$$n! \approx$$ $${n^n}\sqrt {2\pi n} \,\exp \left( { – n} \right) \cdot$$ $$\Big[ {1 + {\large\frac{1}{{12n}}\normalsize} + {\large\frac{1}{{288{n^2}}}\normalsize} }-$$ $${ {\large\frac{{139}}{{51840{n^3}}}\normalsize} – \ldots } \Big]$$.
Taking into account only the first term in the expansion, this formula takes the form
$$n! \approx {n^n}\sqrt {2\pi n} \,\exp \left( { – n} \right)$$.
8. Double factorial
The double factorial is the product of all odd integers from $$1$$ to some odd positive integer $$n$$. The double factorial is denoted by $$n!!$$
$$\left( {2k + 1} \right)!! =$$ $$1 \cdot 3 \cdot 5 \cdots \left( {2k – 1} \right) \cdot$$ $$\left( {2k + 1} \right).$$
Sometimes, the double factorial is considered for even integers. We can define it as
$$\left( {2k} \right)!! =$$ $$2 \cdot 4 \cdot 6 \cdots \left( {2k – 2} \right) \cdot 2k$$
It is implied here that $$0!! = 1.$$