# 1985 AHSME Problems/Problem 29

## Problem

In their base $10$ representations, the integer $a$ consists of a sequence of $1985$ eights and the integer $b$ consists of a sequence of $1985$ fives. What is the sum of the digits of the base $10$ representation of $9ab$? $\mathrm{(A)\ } 15880 \qquad \mathrm{(B) \ }17856 \qquad \mathrm{(C) \ } 17865 \qquad \mathrm{(D) \ } 17874 \qquad \mathrm{(E) \ }19851$

## Solution

Notice that $a=8\cdot10^0+8\cdot10^1+\cdots+8\cdot10^{1984}=\frac{8\cdot10^{1985}-8}{9}$ by the formula for a geometric series.

Similarly, $b=\frac{5\cdot10^{1985}-5}{9}$.

Thus, $9ab=9\left(\frac{8\cdot10^{1985}-8}{9}\right)\left(\frac{5\cdot10^{1985}-5}{9}\right)=\frac{40(10^{1985}-1)^2}{9}$.

We can multiply out $(10^{1985}-1)^2$ to get $9ab=\frac{40(10^{3970}-2\cdot10^{1985}+1)}{9}=\frac{4(10^{3971}-2\cdot10^{1986}+10)}{9}$.

We now find this in decimal form. $10^{3971}=10000\cdots00$, where there is $1$ one and $3971$ zeroes. $2\cdot10^{1986}=2000\cdots00$, where there is $1$ two and $1986$ zeroes.

We subtract to find that $10^{3971}-2\cdot10^{1986}=9999\cdots98000\cdots00$, where there are $1984$ nines, $1$ eight, and $1986$ zeroes.

We now add $10$ to get $999\cdots998000\cdots010$, where there are $1984$ nines, $1$ eight, $1984$ zeroes, $1$ one, and a final zero.

Next, we begin to divide by $9$. We get this to be $111\cdots110888\cdots890$, where there are $1984$ ones, $1$ zero, $1984$ eights, $1$ nine, and a final zero.

Finally, we have to multiply by $4$. Doing this, we find that the pattern continues, and the final outcome is $4444\cdots443555\cdots5560$, where there are $1984$ ones, $1$ three, $1984$ fives, $1$ six, and a final zero. Adding this up, the sum of the digits is $1984(4)+3+1984(5)+6+0=17865, \boxed{\text{C}}$.

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 