Gamma and Factorial
$\Gamma(n+1)$ and $n!$
Factorial is an operation unique to positive integers and zero. There is no direct definition of factorial for positive real numbers. But if we connect the discrete points in the factorial function into a smooth curve, we get the factorial of a positive real number. And that's gamma function:
$$
\Gamma(x)=\int_0^{+\infty}t^{x-1}e^{-t}dt(x>0)
$$
gamma function is the expansion of factorial on positive real numbers:
$$
\Gamma(n+1)=n!
$$
Therefore:
1 | import math |