The concept of factorials is very important for the number system when the student is preparing for the CAT examination. In this article we will discuss about the factorials and their applications.

**Meaning of factorial:** Factorial of a number N means the product of all the natural numbers up to N.

It is denoted using the symbol ! and is written as N!

So, 1! = 1

2! = 1 × 2 = 2

3! = 1 × 2 × 3 = 6

4! = 1 × 2 × 3 × 4 = 24

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

6! = 1 × 2 × 3 × 4 × 5 × 6 = 720 and so on.

So in general N! = 1 × 2 × 3 × 4 × …….. × (N – 2) × (N – 1) × N

**Note:** The value of 0! = 1

Now let us understand the concept of trailing zeroes in N!

Sometimes, in the examination, you will find the questions like how many trailing zeroes will be their at the end of N!. To solve these questions, you should keep in mind that a zero will be obtained if we multiply a 2 with 5 (We will deal with the prime numbers only). So, 10 = 2 × 5

In order to get 2 zeroes, we need two 2s and two 5s and multiply them as 2 × 5 × 2 × 5 = 100 and so on. Hence, to get the number of trailing zeroes in any N!, we need to find the number of times 2s and 5s are occurring in the prime factorisation of such numbers. Let us take an example of 10!.

We have, 10! = 1 × 2 × 3 × 4 × 5 × 6 × 7 × 8 × 9 × 10

Or 10! = 1 × 2 × 3 × 2 × 2 × 5 × 2 × 3 × 7 × 2 × 2 × 2 × 3 × 3 × 2 × 5 (Prime factorisation of 10!)

Now, in the above prime factorisation, there are eight 2s and two 5s. These two 5s will combine with two 2s to give us 2 trailing zeroes. Therefore, 10! has 2 trailing zeroes.

In the above example, we prime factorised the 10! and counted the number of 2s and 5s manually. But it will not be possible with the larger numbers. So, we will check the following method which explains how to find the number of prime numbers ‘p’ in any factorial say N!.

**Method to find the number of primes ‘p’ in N!:**

To get the number of times a particular prime number exists in the prime factorisation of N!, we divide N by p and its powers and write down the quotients only till we get non zero quotients. Then, we add all the quotients obtained and get the answer.

Let us find the number of 2s in 10!.

Divide 10 by 2 and its powers.

[10/2] = 5 (5 is the quotient)

[10/2^{2}] = 2 (2 is the quotient when 10 is divided by 4)

[10/2^{3}] = 1 (1 is the quotient when 10 is divided by 8)

[10/2^{4}] = 0 (0 is the quotient when 10 is divided by 16)

Now add up all the quotients, the sum = 5 + 2 + 1 = 8

So, there are eight 2s in the prime factorisation of 10!.

Let us now try to find the number of 3s in 50!

Divide 50 by 3 and its powers and write down the quotients and then add all the non zero quotients.

So, [50/3] = 16

[50/3^{2}] = 5

[50/3^{3}] = 1

Now add all the quotients i.e., 16 + 5 + 1 = 22

Therefore, there are 22 times 3 in the prime factorisation of 50!.

**Note: You can only find the number of prime numbers in the prime factorisation of N! and not the composite numbers. In order to get the number of composite numbers, we break the composite numbers into prime numbers.**

Let us now come to our initial discussion of the number of trailing zeroes in N!.

As discussed above, to get the number of zeroes, we need only 5s and 2s. But remember that when you prime factorise N!, the smaller prime number will always occur more number of times than the larger prime number. So, in any N!, the number of 2s will always be more than the number of 5s. Therefore, we do not need to check both 2s and 5s for the number of zeroes. As, number of 5s will be less than the numbers of 2s, so it is better to find the number of 5s only. The total number of 5s in N! will be equal to the total number of trailing zeroes in N!.

**Ex. Find the number of trailing zeroes in 80!.**

**Sol: **In order to find the number of trailing zeroes in 80!, we will find the number of 5s in 80!

Number of 5s = [80/5] + [80/5^{2}] + [80/5^{3}] = 16 + 3 + 0 = 19

As, there are 19 times 5s in 80!, therefore, there will be 19 trailing zeroes in 80!.

**Ex. Find the number of trailing zeroes in 100!.**

**Sol:** Number of 5s in 100! = [100/5] + [100/5^{2}] + [100/5^{3}] = 20 + 4 + 0 = 24

Therefore, there are 24 trailing zeroes in 100!.

Next, with the help of above concept, we can also find the number of times a composite number can occur in N! or the highest power of a number that can divide N!.

Let us take few examples:

**Ex. What is the highest power of 6 that can divide 70! completely?**

**Sol:** The highest power of 6 that will divide 70! completely will be same as the number of times we can make 6 by multiplying the prime numbers in 70!

Now 6 = 2 × 3. So, in order to get one 6, we need to multiply one 2 and one 3. As number of 3s in 70! will be less than the number of 2s, therefore, we will find the number of 3s in 70!

Number of 3s = [70/3] + [70/3^{2}] + [70/3^{3}] = 23 + 7 + 2 = 32

Therefore, there will be 32 times 6 in 70!. Hence, the highest power of 6 that can completely divide 70! is 32.

** Ex. What is the highest power of 12 that can divide 70! completely?**

**Sol:** Here 12 = 2^{2} × 3

Number of 3s = [70/3] + [70/3^{2}] + [70/3^{3}] = 23 + 7 + 2 = 32

Number of 2s = [70/2] + [70/2^{2}] + [70/2^{3}] + [70/2^{4}] + [70/2^{5}] + [70/2^{6}] = 35 + 17 + 8 + 4 + 2 + 1 = 67

Here, we have calculated the number of 2s also as to get one 12, we need one 3 and two 2s

Possible number of pairs of 2s = 67/2 = 33

Total number of 3s = 32

As the number of 3s are still less than the possible number of pairs of 2s, therefore, there will be 32 times 12 in 70!.

Hence, the highest power of 12 that can divide 70! completely is 32.

Let us now solve the following practice questions.

**1. What is the position from the right where a non zero digit will appear in 150!?**

**Sol:** Number of zeroes in 150! = [150/5] + [150/5^{2}] + [150/5^{3}] = 30 + 6 + 1 = 37

Therefore, 38^{th} digit from the right hand side will be the first non zero digit of 150!

**2. What is the rightmost non zero digit of 20!?**

**Sol:** 20! = 2^{18} × 3^{8} × 5^{4} × 7^{2} × 11 × 13 × 17 × 19

Now 2^{4} × 5^{4} will give us 4 zeroes at the end of the number. Removing this 2^{4} × 5^{4}, we are left with

2^{14} × 3^{8} × 7^{2} × 11 × 13 × 17 × 19. Now, the first non zero digit will be the unit digit of this remaining number which can be calculated by taking the unit digit of each prime factor separately.

So, unit digit of 2^{14} × 3^{8} × 7^{2} × 11 × 13 × 17 × 19 = 4 × 1 × 9 × 1 × 3 × 7 × 9 = 4

Therefore, the rightmost non zero digit is 4.

**3. Find the highest power of 16 in 200!.**

**Sol:** We have 16 = 2^{4}, so to make one 16, we need four 2s.

Let us calculate the number of 2s in 200!

Number of 2s = [200/2] + [200/2^{2}] + [200/2^{3}] + [200/2^{4}] + [200/2^{5}] + [200/2^{6}] + [200/2^{7}]

= 100 + 50 + 25 + 12 + 6 + 3 + 1 = 197

Number of 16s = 197/4 = 49

Hence, the highest power of 16 is 49.

**4. Find the least value of N, such that N! has 32 zeroes.**

**Sol:** Let us do some hit and trial here. The number of zeroes required are 32. Let us think about smaller number of zeroes say 25. As 25 × 5 = 125, so let us try to find the number of zeroes in 120!

120! = [120/5] + [120/5^{2}] = 24 + 4 = 28

Now 120! has 28 zeroes. After that 125! will have 125 in it which is 5^{3}, so, the number of zeroes will increase by 3. Hence, the number of zeroes in 125! will be 28 + 3 = 31. Next increase in number of 5s will happen at N = 130. So, 130! will have 32 zeroes. After that for N= 131, 132, 133, 134, N! will still have 32 zeroes as none of these numbers are multiple of 5 and therefore, will not increase the number of 5.

Hence, the least number N for which N! has 32 zeroes is 130.

**5. Find the least value of N, such that N! has 36 zeroes.**

**Sol:** As we need 36, zeroes, let us think about some smaller number say 30. As 30 × 5 = 150, so let us try to find the number of zeroes in 140!

140! = [140/5] + [140/5^{2}] + [140/5^{3}] = = 28 + 5 + 1 = 34

So, 140! has 34 zeroes. Next, at 145!, there will be an increase of 5. So, 145! will have 35 zeroes and it will remain till 149!. After that at 150!, we have extra number 150 which is 2 × 3 × 5^{2}. So, the number of 5s will increase by 2. Therefore, 150! will have 35 + 2 = 37 zeroes.

Hence, there exist no value of N, for which N! has 36 zeroes.

Hope that the above discussion is helpful to understand the concept of number of zeroes and the highest power of a number that can divide N!.

The concept is important if you are preparing for the CAT exam or any other management entrance exam.

In the next article we will discuss one more important concept.

Till then Happy Learning!!!

© Copyright Quantifiers. All Rights Reserved.