# Factorial number

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In mathematics symbolized by placing the "!" (known as the exclamation mark or bang) after a number, it represents multiplying a number by all whole numbers smaller than it.

## Definition

A factorial is defined by the product

$n! = 1 \cdot 2 \cdot 3 \cdots (n{-}2) \cdot (n{-}1) \cdot n$

for $n ≥ 1$.

The same written as mathmatical product

$n! = \prod_{i = 1}^n i.$

and as recurrence relation

$n! = n \cdot (n-1)!$

## Examples

5! = 5 * 4 * 3 * 2 * 1 = 120
10! = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 3628800