110k views
0 votes
Recall that the factorial function is defined as n! = 1 · 2 · 3 · ? · (n ? 1) · n and, by convention, 0! = 1. Give a recurrence relation for n!.

1 Answer

2 votes
Let
a_n denote the factorial of any non-negative integer
n.

By convention, we take
0!=1, so that
a_0=1. As
n!=n\cdot(n-1)\cdot\cdots\cdot2\cdot1 by definition, we can obtain the next integer's factorial,
a_(n+1)=(n+1)!, by multiplying the previous term
a_n=n! by the next integer.

The recursive definition for the factorial function can then be given by


\begin{cases}a_0=1\\a_(n+1)=(n+1)a_n&\text{for }n\ge0\end{cases}
User Cantlin
by
6.0k points