1998 AMC 12 Problem 30

Attempt Problem 30 of the 1998 AMC 12 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 1998 AMC 12 solutions, or check the answer key.

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

30.

For each positive integer n,n, let an=(n+9)!(n−1)!. a_n=\frac{(n+9)!}{(n-1)!}. Let kk denote the smallest positive integer for which the rightmost nonzero digit of aka_k is odd. The rightmost nonzero digit of aka_k is
11
33
55
77
99
Answer: E
Concepts:prime valuationstrailing digitsmodular arithmetic
Small hint:
Write an=n(n+1)⋯(n+9)a_n=n(n+1)\cdots(n+9) and compare its powers of 22 and 55
Big hint:
An odd rightmost nonzero digit first becomes possible when the ten-term block contains 575^7
Solution:
The five even terms in any ten consecutive integers contribute at least 28.2^8. Thus the rightmost nonzero digit can be odd only when the block contains at least eight factors of 5,5, first possible when it contains 57=78125.5^7=78125. For n=57−9,n=5^7-9, the block has v2=9v_2=9 and v5=8,v_5=8, so the digit remains even. For n=57−8=78117,n=5^7-8=78117, both valuations are 8.8. Cancelling 28582^8 5^8 and multiplying the remaining odd unit digits gives 7⋅9⋅1⋅3⋅9⋅3⋅1⋅1⋅3≡9(mod10). \begin{aligned} &7\cdot9\cdot1\cdot3\cdot9\cdot3\\ &\qquad\cdot1\cdot1\cdot3 \equiv9\pmod{10}. \end{aligned} Hence the first odd rightmost nonzero digit is 9,9, and E is correct.
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.