Difference between revisions of "2021 JMPSC Accuracy Problems/Problem 15"
Mathdreams (talk | contribs) (→Solution) |
Geometry285 (talk | contribs) m |
||
Line 6: | Line 6: | ||
~Mathdreams | ~Mathdreams | ||
+ | |||
+ | ==Solution 2 (More Algebraic)== | ||
+ | <cmath>\sum_{n=1}^{100} f(n) = 5(100)+70(\underbrace{1+11+111+1111+ \cdots}_{\text{100 1s}}) + 100(44444 \cdots )</cmath> We only care about the last <math>3</math> digits, so we evaluate <math>1+11+111+1111+ \cdots</math>. Note the expression is simply <math>1(100)+10(99)+100(98)+1000(97)+ \cdots + 10^{100}</math>, so factoring a <math>10</math> we have <math>1(10)+99+10(98)+ \cdots + 10^{99}</math>. Now, we can divide by <math>25</math> to get <cmath>20+28(1(10)+99+10(98)+100(97) \cdots)+4(444444 \cdots )</cmath> Evaluate the last <math>3</math> digits to get <cmath>20+28(10+99+980+700)+4(444)=\boxed{888} \mod 1000</cmath> | ||
+ | <math>\linebreak</math> | ||
+ | ~Geometry285 |
Revision as of 12:34, 11 July 2021
Problem
For all positive integers define the function
to output
For example,
,
, and
Find the last three digits of
Solution
Notice that ,
,
, and
ends in
for all
. So, the last 3 digits of
are the last
digits of
, which are
.
~Mathdreams
Solution 2 (More Algebraic)
We only care about the last
digits, so we evaluate
. Note the expression is simply
, so factoring a
we have
. Now, we can divide by
to get
Evaluate the last
digits to get
~Geometry285