1994 AIME Problem 5

Attempt Problem 5 of the 1994 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 1994 AIME solutions, or check the answer key.

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

5.

Given a positive integer n,n, let p(n)p(n) be the product of the nonzero digits of n.n. (If nn has only one digit, then p(n)p(n) is equal to that digit.) Let S=p(1)+p(2)+p(3)++p(999).\begin{aligned}S&=p(1)+p(2)+p(3)\\&\quad+\cdots+p(999).\end{aligned} What is the largest prime factor of S?S?

Answer: 103
Concepts:digitsmultiplication principleprime factorization
Difficulty rating: 2110
Small Hint:

Write every number from 000000 through 999999 using three digits and let a zero digit contribute a factor of 11

Big Hint:

The sum factors by digit position; remember to remove the contribution of 000000

Solution:

For one digit position, the sum of its effective factors is 1+1+2++9=46,1+1+2+\cdots+9=46, where the first 11 represents digit 0.0. Thus the sum over 000000 through 999999 is 463.46^3. Removing the artificial contribution 11 from 000000 gives S=4631=45(462+46+1)=452163.\begin{aligned}S&=46^3-1\\&=45(46^2+46+1)\\&=45\cdot2163.\end{aligned} Since 2163=3721=37103,2163=3\cdot721=3\cdot7\cdot103, the largest prime factor is 103.103.

← Problem 4#4
Full Exam

Problem 5 in Other Years