1's

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

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

k = 0 1008 1 0 k \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.

2 solutions

Jake Lai
Mar 10, 2015

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

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

Because

1008 ! = ( 1009 1 ) ! 1 ( m o d 1009 ) 1008! = (1009-1)! \equiv -1 \pmod{1009}

due to Wilson's theorem, and

1008 ! = ( 1009 1 ) × 1007 ! 1007 ! ( m o d 1009 ) 1008! = (1009-1) \times 1007! \equiv -1007! \pmod{1009}

it is then the case that

1007 ! + 2 1 + 2 3 ( m o d 1009 ) 1007!+2 \equiv 1+2 \equiv 3 \pmod{1009}

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

In case anyone didn't get the "due to Wilson's theorem" lines, it is probably easier to write

1007 ! = ( 1007 ! ) ( 1009 1 ) ( 1007 ! ) 1008 ! ( 1 ) 1 ( m o d 1009 ) 1007! = -(-1007!) \equiv -(1009-1)(1007!) \equiv -1008! \equiv -(-1) \equiv 1 \pmod{1009}

Jake Lai - 6 years, 3 months ago

yes this is a correct methods

M ELUMALAI - 6 years, 2 months ago

this is exactly what I did :D

Andrea Virgillito - 4 years, 8 months ago
Jason Martin
Mar 13, 2015

I use the fact that if n = d q + r n=dq+r for 0 r < d 0\leq r <d , then x n 1 x d 1 = ( x d 1 ) f ( x ) + x r 1 x d 1 \frac{x^n-1}{x^d-1}=(x^d-1)f(x)+\frac{x^r-1}{x^d-1} , for some polynomial f ( x ) f(x) .

I also use k = 0 n 1 x k = x n 1 x 1 \displaystyle \sum_{k=0}^{n-1} x^k =\frac{x^n-1}{x-1} .

Thus, k = 0 1007 ! + 1 1 0 k k = 0 1008 1 0 k = 1 0 1007 ! + 2 1 1 0 1009 1 = ( 1 0 1009 1 ) f ( 10 ) + 1 0 r 1 1 0 1009 1 \frac{\displaystyle \sum_{k=0}^{1007!+1} 10^k}{\displaystyle \sum_{k=0}^{1008} 10^k}= \frac {10^{1007!+2}-1}{10^{1009}-1}=(10^{1009}-1) \cdot f(10) +\frac{10^r-1}{10^{1009}-1} .

It turns out that 1009 1009 is prime, so by Wilson's theorem, 1008 ! = 1 1008!=-1 mod 1009 1009 , so 1007 ! + 2 = 3 1007!+2=3 mod 1009 1009 . Therefore, r = 3 r=3 , so 1 0 r 1 1 0 1009 1 = 1 0 3 1 1 0 1009 1 = 1 0 2 + 10 + 1 k = 0 1008 1 0 k \frac{10^r-1}{10^{1009}-1}=\frac{10^3-1}{10^{1009}-1}=\frac{10^2+10+1}{\displaystyle \sum_{k=0}^{1008} 10^k} ,

So k = 0 1007 ! + 1 1 0 k = 1 0 2 + 10 + 1 = 111 \displaystyle \sum_{k=0}^{1007!+1} 10^k=10^2+10+1=111 mod k = 0 1008 1 0 k \displaystyle \sum_{k=0}^{1008} 10^k

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...