mod 2018

What is the remainder when 2 2018 20 2^{2018} -20 is divided by 2018?


The answer is 2002.

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.

1 solution

Relevant wiki: Euler's Theorem

Let N = 2 2018 20 N = 2^{2018}-20 . We need to find N m o d 2018 N \bmod 2018 . Since gcd ( 2 , 20 , 2018 ) 1 \gcd(2,20,2018) \ne 1 , we have to consider the prime factors 2 and 1009 of 2018 separately using the Chinese remainder theorem .

Consider factor 2: 2 2018 20 0 (mod 2) 2^{2018}-20 \equiv 0 \text{ (mod 2)}

Consider factor 1009:

N 2 2018 m o d ϕ ( 1009 ) 20 (mod 1009) Since gcd ( 2 , 1009 ) = 1 , Euler’s theorem applies. 2 2018 m o d 1008 20 (mod 1009) Euler’s totient function ϕ ( 1009 ) = 1008 2 2 20 (mod 1009) 16 (mod 1009) 993 (mod 1009) \begin{aligned} N & \equiv 2^{\color{#3D99F6} 2018 \bmod \phi(1009)} - 20 \text{ (mod 1009)} & \small \color{#3D99F6} \text{Since }\gcd(2,1009) = 1 \text{, Euler's theorem applies.} \\ & \equiv 2^{\color{#3D99F6} 2018 \bmod 1008} - 20 \text{ (mod 1009)} & \small \color{#3D99F6} \text{Euler's totient function }\phi(1009) = 1008 \\ & \equiv 2^2 - 20 \text{ (mod 1009)} \\ & \equiv - 16 \text{ (mod 1009)} \\ & \equiv 993 \text{ (mod 1009)} \end{aligned}

This implies that:

N 1009 n + 993 where n is an integer. 1009 n + 993 0 (mod 2) n + 1 0 (mod 2) n 1 N 1009 ( 1 ) + 993 (mod 2018) 16 (mod 2018) 2002 (mod 2018) \begin{aligned} N & \equiv 1009n+993 & \small \color{#3D99F6} \text{where }n \text{ is an integer.} \\ \implies 1009n + 993 & \equiv 0 \text{ (mod 2)} \\ n +1 & \equiv 0 \text{ (mod 2)} \\ \implies n & \equiv - 1 \\ \implies N & \equiv 1009(-1) + 993 \text{ (mod 2018)} \\ & \equiv - 16 \text{ (mod 2018)} \\ & \equiv \boxed{2002} \text{ (mod 2018)} \end{aligned}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...