factorial

In mathematics, the factorial of a non-negative integer, n, denoted n! is the product of all of the positive integers less than or equal to n. By convention 0! = 1. More formally,

(1)   \begin{equation*} n! = \prod_{k=1}^{n}k \end{equation*}

The factorial function can also be defined recursively:

(2)   \begin{equation*} n! = \begin{cases} 1, & \text{if $n = 0$},\\ (n - 1)! * n & \text{if $n > 0$} \end{cases} \end{equation*}

« Back to Glossary Index

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.