2
$\begingroup$

How many ones are in the decimal representation of $S = \displaystyle \frac{10^{n+1} - 10 - 9n}{81}$, and the specific case $n=2002$? What I have tried doing is adding up the digits individually, but there doesn't seem to be a clear pattern.

$\endgroup$
1
$\begingroup$

Let $$A := \frac{10^{n+1}-10}{9}=10(1+10+10^2+ \cdots + 10^{n-1})$$ Therefore $S=\frac{A-n}{9}$ $$A=11111.......110$$ where number of 1's are 2002 as $n=2002$ now $A-2002$=$1111.......09108$ where number of 1's are $4$ less that is $1998$ now this is nothing but $1111.....100000$+$9108$ now notice there is a pattern when you divide a number with consecutive 1's and try to use that property $$property:$$ when u divide a number containing 5 1's by 9 you get a number of form $1234.555555\cdots$ similarly for 6 1's you get $12345.666666\cdots$ except for when you have 9 1's you get $123456789$ and then for 10 1's you have $1234567890.111\cdots$ and then it is cyclic now see when number of 1's are 2002 the last digits of the number when divided by 9 is same as when number have 5 1's are divided by 9 so then you can calculate the number of 1's present after adding $\frac{9108}{9}$ which is $1012$

$\endgroup$
  • $\begingroup$ Could you please clarify what this property is and how exactly it can be used to count the number of 1's? $\endgroup$ – James Harrison Sep 27 '14 at 11:25
  • $\begingroup$ hope this helps , i have left the final calculation part so that you can understand it better , if you have a problem with it feel free to ask $\endgroup$ – avz2611 Sep 27 '14 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.