Skip to main content

1994 AIME Problem 5

Problem 5 of 15EasierNumber TheoryCombinatorics

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?

Your answer

Integer from 0 to 999
Show solution

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=463−1=45(462+46+1)=45⋅2163.\begin{aligned}S&=46^3-1\\&=45(46^2+46+1)\\&=45\cdot2163.\end{aligned} Since 2163=3⋅721=3⋅7⋅103,2163=3\cdot721=3\cdot7\cdot103, the largest prime factor is 103.103.
AoPS wiki

Tagged: digits · multiplication principle · prime factorization

More practice