The factorial function (n!) is a recursive mathematical function that produces factorials (5×4×3×…) of size n. Definition § n!=n×(n−1)! , 0!=1 For example, with 5! 5!=5×4!=5×4×3!=5×…2×=120