FACTORIAL

The factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n: n! = n⋅(n-1)⋅(n-2)⋅(n-3)⋅...⋅3⋅2⋅1

The value of 0! is 1, according to the convention for an empty product

The factorial counts the possible distinct sequences (the permutations) of n distinct objects

Factorial: n ∈ ℕ, n! = {1 (n=0); 1⋅2⋅3⋅n (n≠0)}

3! = 1⋅2⋅3 = 6

5! = 1⋅2⋅3⋅4⋅5 = 120

n! is the number of possible orders of n objects

3! = 6; abc, acb, bac, bca, cab, cba = 6 possible distinct sequences called permutations

In general, n objects can be sorted into n! different ways