Solving $7^{2020} \equiv x \operatorname{mod} 10000$ using CRT

140 Views Asked by At

I want to compute the last four digits of $7^{2020}$ using the Chinese Remainder Theorem (CRT).

Here is what I've got so far:

Obviously \begin{align} 10000 = 10^4 = 2^4 \cdot 5^4, \end{align} so due to CRT we know \begin{align} \mathbb{Z}/10000\mathbb{Z} \cong \mathbb{Z}/16\mathbb{Z} \times \mathbb{Z}/625\mathbb{Z}. \end{align} I also do know that \begin{align} \varphi(16) = 8 \quad \text{and} \quad \varphi(625) = 500 \end{align} and therefore \begin{align} 7^8 \equiv 1 \operatorname{mod} 16 \quad \text{and} \quad 7^{500} \equiv 1 \operatorname{mod} 625. \end{align}

(I know that one can find a lot of almost similar questions here on MSE, but I am only interested in solutions, which use CRT. That's due to the fact that I struggle to see how CRT works for those kind of problems. Up to now I used CRT only to compute a solution for multiple congruences. Hence, I would appreciate solutions/hints which straight forward show how to apply CRT here (without any fancy tricks etc.).)

1

There are 1 best solutions below

3
On BEST ANSWER

Continuing with what you have already.

$7^{2020} = 7^{2016}7^{4}\equiv 7^{4}\pmod {16}\\ 7^{2020} = 7^{2000}7^{20}\equiv 7^{20}\pmod {625}$

But we can do better.

$7^2 = 49 \equiv 1\pmod {16}\\ 7^{2020} \equiv 1\pmod {16}$

$7^4 = 2401 \equiv -99 \pmod {625}\\ 7^{20} \equiv (1-100)^5 \pmod {625}$

Every term in the binomial expansion of $(1-100)^5$ after the first two be multiples of $10,000$ that can be ignored.

$(1-100)^5 \equiv -499\equiv 126 \pmod {625}$

Now you can use the Chinese remainder theorem.

$7^{2020} \equiv 2001 \pmod {10,000}$

In fact, $7^{20} \equiv 2001 \pmod {10,000}$ and you can stop there.