Highest Power in Factorial: Formula, Methods and Examples
Highest Power in Factorial means finding the greatest exponent of a number that divides a factorial exactly. For a prime p, use Legendre’s formula by adding the quotients obtained from n divided by p, p², p³ and so on. The same method extends to composite numbers through prime factorisation and minimum exponents.
What Is the Highest Power in a Factorial?
For n!, count the multiples of p, p², p³ and higher powers of p among the numbers from 1 to n. Thus, v_p(n!) = floor(n/p) + floor(n/p²) + floor(n/p³) + ... . Stop when p^k > n. For example, v_3(10!) = floor(10/3) + floor(10/9) = 3 + 1 = 4, so the highest power of 3 dividing 10! is 3^4.
Highest Power in Factorial Formula & Tricks
Important Formulas
Here p is prime, n! = 1 × 2 × 3 × ... × n, and terms are included only while p^k ≤ n.
First calculate v_p(n!), then raise p to that exponent.
Factor the base a and find how many complete copies of every prime factor are available in n!.
Quick Tricks
For a prime p, list p, p², p³ and stop after the first power greater than n. This prevents missing a term in Legendre’s sum.
After finding the prime exponents in n!, divide each by the corresponding exponent in the composite base. The smallest quotient determines the answer.
If p^j > n, then floor(n/p^j) = 0, so no further terms are needed.
Highest Power in Factorial Concepts
Legendre’s Method for a Prime Factor
The first quotient counts multiples of p, the second counts an additional factor of p in multiples of p², and so on. For 25!, v_5(25!) = floor(25/5) + floor(25/25) = 5 + 1 = 6. Hence 5^6 divides 25!, but 5^7 does not.
Counting Prime Factors by Multiples
This layered counting explains why simply counting multiples of p is insufficient. For 16!, the multiples of 2 contribute 8, those of 4 add 4, those of 8 add 2, and 16 adds 1. Therefore v₂(16!) = 8 + 4 + 2 + 1 = 15.
Highest Power of a Composite Number
Suppose a = 2^2 × 3. If n! contains 2^u and 3^v, then it contains 12^k only when 2k ≤ u and k ≤ v. Hence k = min(floor(u/2), v). For 25!, v₂ = 12 + 6 + 3 + 1 = 22 and v₃ = 8 + 2 = 10, so the highest power of 12 is 12^10.
Highest Power of a Product or Factorial Expression
For a divisor such as 72 = 2^3 × 3², determine v₂(n!) and v₃(n!), then calculate min(floor(v₂/3), floor(v₃/2)). The prime with the smaller ratio limits the power of 72 that can divide n!.
Highest Power in Factorial Video Lessons
Watch short topic-wise lessons for quick revision.
Factorials: Trailing Zeros and Prime Powers
Learn how to find trailing zeros in factorials and determine the highest power of a prime that divides a factorial using standard number system methods.
Practice Highest Power in Factorial Questions
Practise published questions related to this topic.
Highest Power in Factorial Quick Quiz
Attempt 5 questions and check your score instantly.
Keep practising
Practice more Highest Power in Factorial questions in the PrepShots app and continue from your current topic.
Practice More Questions - Start ₹1 Trial →Quick Revision Notes
Highest Power in Factorial: Quick Revision
Use these rules to calculate prime and composite powers in factorials.
- For prime p, v_p(n!) = floor(n/p) + floor(n/p²) + floor(n/p³) + ... .
- Stop the sum when p^k > n.
- The highest power of p dividing n! is p^{v_p(n!)}.
- For a = p₁^{e₁}p₂^{e₂}..., the exponent of a is the minimum of floor(v_{p_i}(n!)/e_i).
- Counting only multiples of p misses the extra factors contributed by multiples of p², p³ and higher powers.
- If p > n, then p does not divide n!, so v_p(n!) = 0.
Highest Power in Factorial FAQs
What is the formula for the highest power of a prime p in n!?
Use v_p(n!) = floor(n/p) + floor(n/p²) + floor(n/p³) + ... . The highest power is then p^{v_p(n!)}.
What is the highest power of 5 in 100!?
v₅(100!) = floor(100/5) + floor(100/25) = 20 + 4 = 24. Therefore, the highest power of 5 is 5^24.
What is the highest power of 2 in 25!?
v₂(25!) = 12 + 6 + 3 + 1 = 22. Hence 2^22 is the highest power of 2 dividing 25!.
How do you find the highest power of 12 in 25!?
Since 12 = 2² × 3, calculate v₂(25!) = 22 and v₃(25!) = 10. Thus k = min(floor(22/2), 10) = 10, so the answer is 12^10.
Why are powers such as p² and p³ included in Legendre’s formula?
A multiple of p² contains at least two factors of p, and a multiple of p³ contains at least three. The additional terms count these extra factors after the first factor has been counted.
What happens when the prime p is greater than n?
No number from 1 to n is divisible by p, so v_p(n!) = 0. Therefore p does not divide n!.
