1992 AIME Problem 15

Attempt Problem 15 of the 1992 AIME below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 1992 AIME solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

15.

Define a positive integer nn to be a factorial tail if there is some positive integer mm such that the decimal representation of m!m! ends with exactly nn zeroes. How many positive integers less than 19921992 are not factorial tails?
Answer: 396
Concepts:trailing zerosfactorialcomplementary counting
Small hint:
Let f(m)=∑j≥1⌊m5j⌋f(m)=\sum_{j\geq1}\lfloor \frac{m}{5^j}\rfloor, the number of trailing zeroes in m!m!
Big hint:
Every positive value attained by ff first appears at a multiple 5k5k, where f(5k)=k+f(k)f(5k)=k+f(k)
Solution:
The number of trailing zeroes is f(m)=∑j≥1⌊m5j⌋.f(m)=\sum_{j\geq1}\lfloor \frac{m}{5^j}\rfloor. Its positive distinct values occur at the multiples 5k,5k, and f(5k)=k+f(k)f(5k)=k+f(k) is strictly increasing with k.k. Now f(1595)=319+63+12+2=396,\begin{aligned}f(1595)&=319+63\\&\quad+12+2=396,\end{aligned} so f(7975)=1595+396=1991.f(7975)=1595+396=1991. For k=1596,k=1596, the same calculation gives f(k)=396,f(k)=396, hence f(5k)=1992.f(5k)=1992. Therefore exactly 15951595 positive values through 19911991 are factorial tails. Of the 19911991 positive integers below 1992,1992, the number omitted is 1991−1595=396.1991-1595=396.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.