0

Find the last $2$ digits of $2016^{123}$

So you have that $2016^{123} \equiv \pmod{100}$

then $16^{123}\equiv \pmod{100}$

Now the $gcd(16,100)=4$ so I divide everything by 4 $4^{123} \equiv \pmod{25}$

I know $4^{\varphi(25)} \equiv 1 \pmod{25}$ then $(4^{20})^6*4^{3} \equiv 14 \pmod{25}$

Then multiplying that by $4$ to get it in the original mod I get $56$ but the answer is $96$ so I"m not sure where I"m making a mistake or if this is the right process to use.

HighSchool15
  • 2,061
  • 14
  • 35

1 Answers1

1

There are two ways of simplifying the congruence to get the desired result:

Using your approach:

$$(2^5\cdot3^2\cdot7)^{123} \equiv (4^2)^{123}\pmod{4\cdot25} $$

Factor $4$ out:

$$2^{613}\cdot3^{246}\cdot7^{123} \equiv 4^{245} \equiv 4^5 \equiv 24 \pmod{25}$$

Now $4\cdot24 = 96$, the desired result.

The $5$ of the last exponent is since $245 \equiv 5 \pmod {\varphi(25)}$


The following for me is the standard approach. Simplifying both congruence class and exponent:

$$\begin{cases} 2016 \equiv 16 \pmod{100} \\ 123 \equiv 3 \pmod{\varphi(100)} \\ 16^3 \equiv 96 \pmod{100} \end{cases}$$

kub0x
  • 2,117
  • 1
  • 15
  • 25