A factorial is a non-negative number which is equal to the multiplication of numbers that are less than that number and the number itself. It is denoted by (!)

**Let’s take an example to understand this **

What will be the value of 5!

So in the above definition we discussed that the multiplication of the numbers which all are less than that number and the number itself. Hence number less than 5 are 1,2,3,4 and 5 is number itself so

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

Always remember we define the value of 0! =1

**Lets take some more examples for this **

Value of 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720

Value of 4! = 4 x 3 x 2 x 1 = 24

Value of 3! = 3 x 2x 1= 6

We can also write n! = n x (n – 1)!

Concept of factorial is very important, there are few basic types in which this concept is used. We will discuss each type with the help of examples.

** **

**Type 1: Highest power of p (p is a prime number) which divides the q! **

Let’s take an example to understand this type

** **

**What is the highest power of 3 that divides 13! ?**

**Solution**:

13! = 13 x 12 x 11 x 10 x 9 x 8 x7 x 6 x 5 x 4 x 3 x 2 x 1

And we have to find highest power of 3 that can divide the above term

So first we need to know how many times 3 is multiplied in 13! .

So to find the number of 3’s we will divide 13 with 3.

13 divided by 3 gives 4 as quotient and 1 remainder. We will keep remainder aside and move further till the quotient cannot be divided further

Again we divide 4 by 3 we get quotient as 1 and again remainder is 1 .Now we stop at this stage because quotient 1 cannot be divided by 4.

Now add all the quotients

4+1 =5.

So the maximum power of 3 is 5, which can divide the 13! .

**We can also generalize the formula for calculating **

Maximum power of any prime p in any n! is calculated as

$ \displaystyle \left[ \frac{n}{p} \right]+\left[ \frac{n}{{{p}^{2}}} \right]+\left[ \frac{n}{{{p}^{3}}} \right]+\left[ \frac{n}{{{p}^{4}}} \right]+………………$

Where [ ] represents integral part

Maximum power of 3 in 13!

$ \displaystyle \left[ \frac{13}{3} \right]+\left[ \frac{13}{{{3}^{2}}} \right]+………..$

= 4+ 1 =5

**Other method**

Since the number 13! is not very big number in-fact we can write and check maximum power of 3

13 x 12 x 11 x 10 x 9 x 8 x7 x 6 x 5 x 4 x 3 x 2 x 1

13 x **3 x4** x 11 x 10 x **3 x 3** x 8 x 7 x **3** x 2 x **3** x 2 x 1

Here the number of 3’s is 5 so we can cancel it with 3^{5}. So maximum power of 3 is 5, which can divide 13!

**Let’s take one more example like this **

**What is the highest power of 7 that exactly divides 49! **

To find the highest power of 7 that exactly divides 49! . We need to know the number of 7’s in the 49!

So when we divide 49 with 7, the quotient will be 7 and there is no remainder, since the quotient can further divided by 7 we will divide 7 with 7 with quotient 1 and remainder 0 .

Now add all quotients and get the answer as 8

So the highest power which will divide the 49! will be 8.