A question by mohit

Level 2

What are the last 4 digits of 10 7 2017 107^{2017} ?

Hint: Solve the problem using Euler's theorem .


The answer is 8907.

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

Mark Hennings
Aug 2, 2018

Note that 10 7 2017 7 2017 + 2017 × 100 × 7 2016 7 2017 + 1700 × 7 2016 ( m o d 10000 ) 107^{2017} \; \equiv \; 7^{2017} + 2017 \times 100 \times 7^{2016} \; \equiv \; 7^{2017} + 1700 \times 7^{2016} \pmod{10000} Now 7 2 1 ( m o d 4 ) 7^2 \equiv 1 \pmod{4} and 7 2 1 ( m o d 5 ) 7^2 \equiv -1 \pmod{5} , so that 7 4 1 ( m o d 5 ) 7^4 \equiv 1 \pmod{5} and 7 20 1 ( m o d 25 ) 7^{20} \equiv 1 \pmod{25} . Thus 7 20 1 ( m o d 100 ) 7^{20} \equiv 1 \pmod{100} , and hence 10 7 2017 7 2017 + 1700 × 7 16 ( m o d 10000 ) 107^{2017} \equiv 7^{2017} + 1700 \times 7^{16} \pmod{10000} Moreover 7 2 1 ( m o d 16 ) 7^2 \equiv 1 \pmod{16} and 7 100 1 ( m o d 125 ) 7^{100} \equiv 1 \pmod{125} and 7 500 1 ( m o d 625 ) 7^{500} \equiv 1 \pmod{625} , so that 7 500 1 ( m o d 10000 ) 7^{500} \equiv 1 \pmod{10000} , and hence 10 7 2017 7 17 + 1700 × 7 6 ( m o d 10000 ) 107^{2017} \equiv 7^{17} + 1700 \times 7^6 \pmod{10000} This last expression can be calculated by hand, and so 10 7 2017 8907 ( m o d 10000 ) 107^{2017} \equiv \boxed{8907} \pmod{10000} .

Let N = 10 7 2017 N=107^{2017} . We need to find N m o d 10000 N \bmod 10000 . Since gcd ( 107 , 10000 ) = 1 \gcd (107, 10000) = 1 , we can apply the Euler's theorem and Carmichael's lambda function λ ( ) \lambda(\cdot) as follows:

N 10 7 2017 m o d λ ( 10000 ) (mod 10000) Since λ ( 10000 ) = 500 10 7 2017 m o d 500 (mod 10000) 10 7 17 (mod 10000) ( 100 + 7 ) 17 (mod 10000) ( 10 0 17 + + 17 × 16 2 × 10 0 2 × 7 15 + 17 × 100 × 7 16 + 7 17 ) (mod 10000) 1707 × 7 16 (mod 10000) 1707 ( 50 1 ) 8 (mod 10000) 1707 ( 5 0 8 + 70000 400 + 1 ) (mod 10000) 1707 ( 399 ) (mod 10000) 1093 (mod 10000) 8907 (mod 10000) \begin{aligned} N & \equiv 107^{2017 \bmod \color{#3D99F6} \lambda (10000)} \text{ (mod 10000)} \quad \quad \small \color{#3D99F6} \text{Since }\lambda(10000) = 500 \\ & \equiv 107^{2017 \bmod \color{#3D99F6} 500} \text{ (mod 10000)} \\ & \equiv 107^{17} \text{ (mod 10000)} \\ & \equiv (100+7)^{17} \text{ (mod 10000)} \\ & \equiv \left(100^{17} + \cdots + \frac {17\times 16}2 \times 100^2 \times 7^{15} + 17 \times 100 \times 7^{16} + 7^{17} \right) \text{ (mod 10000)} \\ & \equiv 1707\times 7^{16} \text{ (mod 10000)} \\ & \equiv 1707(50-1)^8 \text{ (mod 10000)} \\ & \equiv 1707 \left(50^8 - \cdots +70000-400+1\right) \text{ (mod 10000)} \\ & \equiv 1707 (-399) \text{ (mod 10000)} \\ & \equiv -1093 \text{ (mod 10000)} \\ & \equiv \boxed{8907} \text{ (mod 10000)} \end{aligned}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...