2021 JMPSC Accuracy Problems/Problem 15

Revision as of 10:34, 11 July 2021 by Mathdreams (talk | contribs) (Solution)

Problem

For all positive integers $n,$ define the function $f(n)$ to output $4\underbrace{777 \cdots 7}_{n\ \text{sevens}}5.$ For example, $f(1)=475$, $f(2)=4775$, and $f(3)=47775.$ Find the last three digits of \[\frac{f(1)+f(2)+ \cdots + f(100)}{25}.\]

Solution

Notice that $\frac{f(1)}{25} = 19$, $\frac{f(2)}{25} = 191$, $\frac{f(3)}{25} = 1911$, and $\frac{f(n)}{25}$ ends in $111$ for all $n \ge 4$. So, the last 3 digits of $\frac{f(1)+f(2)+ \cdots + f(100)}{25}$ are the last $3$ digits of $19 + 191 + 911 + 111 \cdot 97$, which are $\boxed{888}$.

~Mathdreams