4

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.).)

Bill Dubuque
  • 282,220
offline
  • 972
  • Your comment reveals that your question is how to apply CRT to solve the system $,x\equiv 1\pmod{16},\ x\equiv 126\pmod{625}.\ $ This is a standard application of CRT that is explained in hundreds of prior answers, e.g. see the linked Easy CRT formula. – Bill Dubuque Feb 10 '21 at 10:16

1 Answers1

1

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.

Doug M
  • 58,694
  • How do you know that $7^{2020} \equiv 2001 \operatorname{mod} 10000$ from just knowing $7^{2020} \equiv 1 \operatorname{mod} 16$ and $7^{2020} \equiv 126 \operatorname{mod} 625$? That is exactly the step I could figure out myself when trying to solve the problem alone. – offline Feb 09 '21 at 19:40
  • $126\equiv -2 \pmod {16}$ and $625 \equiv 1 \pmod {16}$ so $126+3\cdot 625 \equiv 1\pmod {16}$ and also $126\pmod {625}$ – Doug M Feb 09 '21 at 19:43
  • 2
    That's the proper CRT part, basically wanting to find what the pair $(1,126)$ in $\mathbb{Z}6 \times \mathbb{Z}{625}$ represents in $\mathbb{Z}_{10000}$. Set $7^{2020}=x$ and use substitution by the Euclidean Division on one of them. $x \equiv 126 \pmod{625} \Rightarrow x = 625k+126 \Rightarrow k - 2 \equiv 1 \pmod{16}$ – David Melo Feb 09 '21 at 19:52