The idea

contains every integer up to , so the exponent of a prime in it is the number of multiples of , plus the multiples of (which carry a second factor), and so on. Trailing zeros are exponents of , and is always the scarcer prime.
Textbook vs exam method
Textbook method
Legendre's formula for each prime; for a composite base take the minimum over its primes after dividing by the exponent in the base. For zeros of general products count s and s term by term. Inverse questions use the fact that increases only at multiples of , by normally and by more at multiples of , , ...
Exam method
- Indore 2019 Q22. , : .Indore 2019
- Zeros of limited by when the base is : .
- 'How many have with exactly zeros': , : none.
- : the bracket ends in , zeros .
- in : is the minimum.
Worked examples
Zeros of
.
Highest power of in
, ; answer .
Zeros of
, multiplied by - exponent form, not a count question; zeros of : .
Smallest with having at least zeros
; , : .
Zeros of
; , : zeros.
Traps
- Only ; wrong prime chosen for composite bases; impossible zero counts; zero counts added for sums.
Formulas
In the exam
- Zeros of : keep dividing by and add the quotients ().
- For find the prime of that runs out first; it is almost always the largest prime, unless a small prime appears with a high exponent in .
- Estimate for ' has zeros', then step by and check.
- For pull out ; the bracket decides nothing about the small primes.
- For products like the exponent of is over multiples of .
Before this
What the exams ask here
- max n with p^n | N!
- zeros at end of N!
- 21^n divides 50! (Indore 2019 Q22); highest power of 24 in 108!
- how many N have N! ending in exactly k zeros; smallest N with k zeros
- zeros at the end of 5 x 10 x 15 ... / 1^1 2^2 ... n^n / 30 x 60 x ... x 30n