 # Number of trailing zeroes and exponents of prime number in factorial

Finding the number of trailing zeroes in 100! (read factorial 100) has become the favorite question in quant among aspirants who prepare for CAT Exam.  In this section, we will be discussing the approaches to solve similar sorts of questions.

## Exponent of any prime number p in n! (factorial n)

The exponent of any prime number p in n! = $\left[ {\frac{{\rm{n}}}{{{{\rm{p}}^1}}}} \right] + \left[ {\frac{{\rm{n}}}{{{{\rm{p}}^2}}}} \right] + \left[ {\frac{{\rm{n}}}{{{{\rm{p}}^3}}}} \right] + ..$, where, [ ] is the greatest integer function.

Here is the video explanation of the above concept

Example 1: Find the highest power of 3 in 100!

Solution:

Highest power of 3 in 100! = $\left[ {\frac{{100}}{{{3^1}}}} \right]$ + $\left[ {\frac{{100}}{{{3^2}}}} \right]$ + $\left[ {\frac{{100}}{{{3^3}}}} \right]$ + $\left[ {\frac{{100}}{{{3^4}}}} \right]$ = 33 + 11 + 3 + 1 = 48

Point to note:

The above solution implies that when 100! is prime factorized, then the prime number 3 will have exponent or power equal to 48.

Similarly, we can find the power of 2 in 100! or any prime number less than 100.  By calculation, an obvious thing to observe is that power of 3 will always be greater than power of 5 but less than power of 2. We will use this observation in the next example.

Example 2: Find the highest power of 21 in 100!

Solution:

As 21 = 3 $\times$ 7

By formula, exponent of 3 and 7 in 100! is 48 and 16 respectively. Therefore, number of pairs of 3 and 7 (i.e. 3$\times$7) will be 16 only.  So, the highest power of 21 in 100! is 16

### Wrong Approach:

Solving the above problem by using the formula directly like $\left[ {\frac{{100}}{{{{21}^1}}}} \right]$ + $\left[ {\frac{{100}}{{{{21}^2}}}} \right]$ +.. is wrong as 21 is NOT a prime, the formula is applicable only for prime numbers.

Example 3: Find the highest power of 12 in 100! (read factorial 100).

Solution:

$12 = {2^2} \times 3$

By formula, exponent of 2 and 3 in 100! is 97 and 48 respectively.

To make one 12, we need two 2’s and one 3. The total number of 2’s is 97, and 3’s is 48. For every one 3 we need two 2’s, hence we will get 48 group of $\left( {{2^2} \times 3} \right)$ by using 96 2’s and 48 3’s. So the answer to the question is 48.

### Finding Number of Trailing Zeroes in Factorial:

Example 4: Find the number trailing of zeroes at the end of 100!

Solution:

The number of trailing zeros is equal to the number of times 100! is successively divisible by 10.

Also, 10 = 2 $\times$ 5. As power of 5 will always be less than power of 2, the number of 10’s in 100! is equal to  Exponent of 5 in 100!

i.e. $\left[ {\frac{{100}}{5}} \right]$ + $\left[ {\frac{{100}}{{{5^2}}}} \right]$ = 20 + 4 = 24. Hence there are 24 trailing zeros in 100!

How to prepare for CAT number system

FREE CAT Quant Practice Problems

Online CAT Quant Course

### Online Course for CAT 2019

Over 4000 Practice problems with video explanations in detail

Covers the entire CAT syllabus

Based on the latest CAT pattern

Online Support : live online sessions for concepts building

### CAT 2021 Crash Course + Mock Test Series (INR 4999 Only)

• 50 Live Sessions
• 1000+ Practice problems
• 30 Sectional Tests
• 15 CAT Mock Tests (Video Solutions)
• Dedicated Whatsapp group for doubt clearing
• Valid till 31st March 2022
 Bodhee Prep's YouTube channel CAT Prep Whatsapp Group CAT Prep Telegram Group X
 CAT prep Telegram Group