Factorial
The product of all positive integers up to a given nonnegative integer.
For a natural number , the factorial of is
with the empty-product convention . It satisfies the recursion .
Factorials encode the prime multiplicities accumulated in an initial interval. For a prime , Legendre's formula gives
where only finitely many summands are nonzero and is the -adic valuation.