$\large \displaystyle\sum_{k=0}^{1007!+1}{10^k}$

Find the remainder when the summation above is divided by the summation below.

$\large \displaystyle\sum_{k=0}^{1008}{10^k}$

The answer is 111.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Note that the first sum is a string of $1007!+2$ 1's, and the second is a string of $1009$ 1's.

We can group the 1's in the first sum together into strings of $1009$ , in however fashion we like. Thus, we start from the left, taking off $1009$ 1's at a time. This is equivalent to taking $1007!+2 \pmod{1009}$ , trying to find how many digits are left at the end.

Because

$1008! = (1009-1)! \equiv -1 \pmod{1009}$

due to Wilson's theorem, and

$1008! = (1009-1) \times 1007! \equiv -1007! \pmod{1009}$

it is then the case that

$1007!+2 \equiv 1+2 \equiv 3 \pmod{1009}$

Since there are $3$ 1's left over, our remainder is $\boxed{111}$ .