Home

factorials

Factorials are a mathematical function defined for nonnegative integers, denoted by n!, and representing the product of all positive integers up to n. By convention, 0! is defined as 1. For example, 4! = 24 and 5! = 120.

The factorial function can be computed recursively: n! = n × (n − 1)!, with the base case

Factorials have a clear combinatorial interpretation: they count the number of ways to arrange n distinct objects

Beyond integers, the factorial concept is extended by the Gamma function, Γ(z), which satisfies Γ(n+1) = n!

Factorials appear throughout mathematics, notably in series expansions such as e^x = sum_{n=0}^∞ x^n / n!, in probability,

0!
=
1.
This
makes
it
straightforward
to
derive
values
and
is
convenient
in
many
proofs
and
algorithms.
in
a
linear
order,
i.e.,
the
number
of
permutations
of
n
items.
They
also
appear
in
the
formula
for
binomial
coefficients,
nCk
=
n!
/
(k!(n
−
k)!),
which
count
k-element
subsets
from
a
set
of
n
elements.
Factorials
grow
very
rapidly
with
n.
for
nonnegative
integers.
For
large
n,
Stirling's
approximation
n!
≈
sqrt(2πn)
(n/e)^n
provides
a
useful
estimate.
Related
products
include
the
double
factorial
n!!
and
various
multifactorials.
combinatorics,
and
asymptotic
analysis.