Highest power of a number in a Factorial

Rarely Tested

Highest power of a number in a Factorial
  • The factorial of $$n$$ is represented as $$n!=1*2*3...*(n-1)*n$$

  • The highest power of a number $$p$$ in a factorial $$n!$$ if $$p$$ is prime: $$\left[\frac{n}{p}\right]\ +\ \left[\frac{n}{p^2}\right]\ +\ \left[\frac{n}{p^3}\right]\ +\ .....$$

  • Let's take the example of the highest power of 5 in 30!

    To find the highest power of 5 in 30, find the number of multiples of 5 in 30 + find the number of multiples of 25 in 30 + so on

    Hence, the highest power of 5 in 30= 6+1 = 7

  • In general, the highest power of p in n is sum = number of multiples of p + number of multiples of $$p^2$$ + number of multiples of $$p^3$$ and so on.

  • The highest power of a number c in a factorial n! if c is composite:

  • If c is a composite, find its highest prime factor. The power of the composite in n! is the same as the power of its highest prime factor. Hence, the highest power of 21 in 100! is the highest power of 7 in 100!. 

  • Hence, the highest power of 7 in 100! = 14+2=16. 

  • Hence, the highest power of 21 in 100! is 16.

Formula Video


Question 1

What is the maximum power of 6 which divides $$66! + 66^{66} ?$$

Question 2

What is the difference in the number of zeroes at the end of 134! when 134! is written in base 7 and in base 10?

Log in to view all questions

Go back to topics

Join CAT 2026 course by 5-Time CAT 100%iler

Crack CAT 2026 & Other Exams with Cracku!