

The factorial n! is defined for
a positive integer as the product of the
same number by all numbers preceding up to 1:
n!=nx(n-1)x(n-2)x...x3x2x1
For example the factorial of 5 is:
5!= 5x4x3x2x1 =120
It is also possible to define the factorial in recursive way, defining the value of 1! so that you can calculate the next factorial one:
1!=1
n!=nx(n-1)!
It turns out that:
2!=2x1!=2x1=2
3!=3x2!=3x2=6
4!=4x3!=4x6=24
and so on.

Factorial of a numberflow chart |
Permutations and combinations flow chart |
![]() | listen | translate |
|
|