The Power Difference

Number Theory Level pending

Let x x be a positive integer that is greater than 2017. If the difference between x x and x 2017 x^{2017} is written as y (mod 10) y \text{ (mod 10)} , what must y y be?

6 8 0 4 1 9 3 5

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

Chew-Seong Cheong
Oct 10, 2018

Relevant wiki: Euler's Theorem

Let x = 10 a + b x = 10a + b , where a a and b b are positive integers. Then x 2017 x ( 10 a + b ) 2017 ( 10 a + b ) ( b 2017 b ) (mod 10) x^{2017} - x \equiv (10a+b)^{2017} - (10a+b) \equiv (b^{2017}-b) \text{ (mod 10)} . There are two following cases.

Case 1: When b b and 10 are coprime integers, which are 1, 3, 7, and 9, then Euler's theorem applies.

b 2017 b ( b 2017 m o d ϕ ( 10 ) b ) (mod 10) where ϕ ( ) is Euler’s totient function ( b 2017 m o d 4 b ) (mod 10) b 1 b (mod 10) 0 (mod 10) \begin{aligned} b^{2017} - b & \equiv (b^{\color{#3D99F6} 2017 \bmod \phi(10)} - b) \text{ (mod 10)} & \small \color{#3D99F6} \text{where }\phi (\cdot) \text{ is Euler's totient function} \\ & \equiv (b^{\color{#3D99F6} 2017 \bmod 4} - b) \text{ (mod 10)} \\ & \equiv b^1 - b \text{ (mod 10)} \\ & \equiv 0 \text{ (mod 10)} \end{aligned}

Case 2: When b b and 10 are not coprime integers, which are 0, 2, 4, 5, 6 and 8.

0 2017 0 0 (mod 10) 2 2017 2 1 6 504 2 2 6 504 6 2 2 0 (mod 10) Powers of 6 always end with 6. 4 2017 4 1 6 1008 2 2 6 2 2 0 (mod 10) 5 2017 5 5 5 0 (mod 10) Odd powers of 5 always end with 5. 6 2017 6 0 (mod 10) 8 2017 4 409 6 504 2 2 6 2 2 0 (mod 10) \begin{aligned} 0^{2017} - 0 & \equiv 0 \text{ (mod 10)} \\ 2^{2017} - 2 & \equiv 16^{504}\cdot 2 - 2 \equiv {\color{#3D99F6}6^{504}}\equiv {\color{#3D99F6}6}\cdot 2 - 2 \equiv 0 \text{ (mod 10)} & \small \color{#3D99F6} \text{Powers of 6 always end with 6.} \\ 4^{2017} - 4 & \equiv 16^{1008}\cdot 2 - 2 \equiv 6\cdot 2 - 2 \equiv 0 \text{ (mod 10)} \\ {\color{#3D99F6}5^{2017}} - 5 & \equiv {\color{#3D99F6}5}-5 \equiv 0 \text{ (mod 10)} & \small \color{#3D99F6} \text{Odd powers of 5 always end with 5.} \\ 6^{2017} - 6 & \equiv 0 \text{ (mod 10)} \\ 8^{2017} - 4 & \equiv 4096^{504}\cdot 2 - 2 \equiv 6\cdot 2 - 2 \equiv 0 \text{ (mod 10)} \end{aligned}

Therefore, x 2017 x 0 (mod 10) x^{2017} - x \equiv \boxed 0 \text{ (mod 10)} for all integers x 0 x \ge 0 .

Otto Bretscher
Oct 10, 2018

It is a fun fact worth knowing that the last digits of the powers x , x 2 , x 3 , x 4 , x 5 , . . . x,x^2,x^3,x^4,x^5,... repeat in a 4-cycle for all positive integers x x . (It takes just one minute to verify this directly, or one can invoke some theory.) Going through this cycle 504 times, we see that the last digits of x x and x 1 + 504 × 4 = x 2017 x^{1+504\times 4}=x^{2017} are the same. Thus x 2017 x 0 (mod 10) x^{2017}-x \equiv \boxed{0} \text{ (mod 10)} . More generally, x 4 n + 1 x (mod 10) x^{4n+1}\equiv x \text{ (mod 10)} for all positive integers n n .

https://brilliant.org/wiki/finding-the-last-digit-of-a-power/

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...