﻿ Factorial — Math18

Math18

# Factorial

Content

## What is the factorial function?

The factorial function is a mathematical formula represented by an exclamation point "!". Given a number n, "n factorial" (written n!). This exclamation means that all positive integers must be multiplied from the assigned number to the number one, in other words, it is the product of all positive integers less than or equal to "n".

## How to calculate the factorial function of a number?

To calculate the factorial function of a number we must multiply a series of numbers that descend, or you can also interpret a series of numbers from the number 1 to the number from which you want to know the factorial.

You are asked to find the factorial of 4, you can also say “4 factorial”, the mathematical representation would be: 4!

4! = 1 x 2 x 3 x 4

It can also be represented on the contrary

4! = 4 x 3 x 2 x 1

As long as you understand every number between the one and the number from which you are asked to find the factorial function, the order of the products is not altered.

4! = 24

Note: It is recommended to accommodate the numbers from highest to lowest.

Examples:

5! = 5 x 4 x 3 x 2 x 1 = 120
3! = 3 x 2 x 1 = 6
8! = 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 40320
2! = 2 x 1 = 2

Exercise:

A) 7! = ?
B) 9! = ?
C) 1! = ?
D) 6! = ?

## The zero factorial

It is a curious fact and there are several mathematical checks of why the zero factor is 1 (0! = 1), in other words, the zero factor is a special case.

Suppose you want to order colored boxes, but you have 0 boxes to order, therefore there is only one way to combine since not being able to order something is considered as a possibility.

0! = 1

## Applications of the factorial function

When calculating the factorial number of a number it allows to know combinations and permutations, by means of the combinations the probabilities can be calculated.

Suppose that 3 balls of different colors (red, blue and green) are contained in a box. How many are the combinations that exist when taking out the 3 balls?

3! = 6

There are 6 combinations:

1. Red, blue and green.
2. Red, green and blue.
3. Blue, red and green.
4. Blue, green and red.
5. Green, red and blue
6. Green, blue and red

## Factorial of a large number

Since the factor values are increasing with respect to the increase in the number "n" it is convenient to use methods that allow obtaining an approximate number.

The Stirling formula provides a good estimate of the factorial of a number:

n! ≈ (2Π)1/2e(-n)n(n + 1/2)

Where:

## Getting the factorial

You are going to obtain the factorial of different numbers using different procedures.

### 2 factorial

Procedure with exact result:

2! = 2 x 1 = 2
Stirling formula:
2! ≈ (2Π)1/2e(-2)2(2 + 1/2) ≈ 1.919

### 3 factorial

Procedure with exact result:

3! = 3 x 2 x 1 = 6
Stirling formula:
3! ≈ (2Π)1/2e(-3)3(3 + 1/2) ≈ 5.836

### 4 factorial

Procedure with exact result:

4! = 4 x 3 x 2 x 1 = 24
Stirling formula:
4! ≈ (2Π)1/2e(-4)4(4 + 1/2) ≈ 23.506

### 5 factorial

Procedure with exact result:

5! = 5 x 4 x 3 x 2 x 1 = 120
Stirling formula:
5! ≈ (2Π)1/2e(-5)5(5 + 1/2) ≈ 118.019

### 6 factorial

Procedure with exact result:

6! = 6 x 5! = 720
Stirling formula:
6! ≈ (2Π)1/2e(-6)6(6 + 1/2) ≈ 710.078

### 7 factorial

Procedure with exact result:

7! = 7 x 6! = 5040
Stirling formula:
7! ≈ (2Π)1/2e(-7)7(7 + 1/2) ≈ 4980.395

### 8 factorial

Procedure with exact result:

8! = 8 x 7! = 40320
Stirling formula:
8! ≈ (2Π)1/2e(-8)8(8 + 1/2) ≈ 39902.395

### 9 factorial

Procedure with exact result:

9! = 9 x 8! = 362880
Stirling formula:
9! ≈ (2Π)1/2e(-9)9(9 + 1/2) ≈ 359536.872

### 10 factorial

Procedure with exact result:

10! = 10 x 9! = 3628800
Stirling formula:
10! ≈ (2Π)1/2e(-10)10(10 + 1/2) ≈ 3598695.618

### 11 factorial

Procedure with exact result:

11! = 11 x 10! = 39916800
Stirling formula:
11! ≈ (2Π)1/2e(-11)11(11 + 1/2) ≈ 39615625.05

### 12 factorial

Procedure with exact result:

12! = 12 x 11! = 479001600
Stirling formula:
12! ≈ (2Π)1/2e(-12)12(12 + 1/2) ≈ 475687486.472