# What are the last five digits of $1+11+111+\cdots+\underbrace{11111...1}_{\text{$2002$"1"s}}$?

Question 25 of the Australian Mathematics Competition, Junior Level, Year 2002:

What are the last 5 digits of this sum? $$1+11+111+\cdots+\underbrace{11111...1}_{\text{2002 "1"s}}$$ Note, the last number a.k.a $$11111...$$ contains 2002 digits of 1.

I've tried to solve this problem but could only get through half of the question.

My method:

So firstly, let's try to solve for the last digit. The one digit can be obtained by adding all 2002 1's together. This ends with a 2. Thus the last digit is 2. Using the same logic for the second to last and 3rd to last digits, they should be 1 and 0 respectively. This means that the answer should end in XX012. I was correct so far but got stuck on the next few steps.

You help would be greatly appreciated.

Thank you.

• Hint: $1\ldots 1 = (10^n-1)/9$. Do you know the sum of a geometric progression? Commented Aug 1, 2023 at 23:06
• Does this answer your question? How would one go about finding the last four digits of this sum? Commented Aug 1, 2023 at 23:09
• FYI, using an Approach0 search, there's the related question of Sum of series : $1+11+111+...$. Commented Aug 1, 2023 at 23:10
• Just continue what you were doing: you want $...80000 + ..99000 + .00000 + 20010 + 2002$ Commented Aug 1, 2023 at 23:25

Define $$n_i$$ in the obvious manner. Then for $$i \geq 5, n_i \equiv 11111 \pmod{100000}$$. Thus, you're looking for:
\begin{align}\sum_{i=1}^{2002} n_i \pmod {100000} &\equiv 1234 + \sum_{i=5}^{2002} 11111 \pmod {100000} \\ &\equiv 1234 + 1998 \cdot 11111 \pmod {100000} \\ &\equiv 1234 + 99778 \pmod {100000} \\ & \equiv 1012 \pmod {100000}.\end{align}
The last five digits of the sum, therefore, are $$01012$$.