Let n be a positive integer, n factorial – notation n! – is the product of the first n positive integers:

n! = 1x2x3x…x n

Example: 4! = 1.2.3.4 = 24

In particular, for n = 0, it is conventionally 0! = 1.

The factorial of N is the number of permutations of a set with N elements.