Congruence (number theory) problem

56 Views Asked by At

The problem is: $1007^{33} + 33^{1007}≡x(mod 5)$

I started with

$1007≡2(mod 5)$ => $1007^{33}≡2^{33}(mod 5)$ => $1007^{33}≡2(mod 5)$

but I am stuck with the other part

I can't find $33^{1007}≡x(mod 5)$ because I can't calculate $33^{1007}$ and I tried with going step by step and trying to guess the solution but I got:

$33≡3(mod5), 33^2≡4(mod5), 33^3≡2(mod5), 33^4≡1(mod 5)...$ So I have no idea what to do.

Also, even if I find it, what should I do next?

Any help will be appreciated, thank you!

1

There are 1 best solutions below

1
On BEST ANSWER

By Fermat's little theorem, $33^4\equiv1\pmod 5$, and so

$$33^{1007} \equiv 33^{251\cdot 4} \cdot 33^{3} \equiv 1\cdot 2 \pmod 5$$


I think you may also wish to know about repeated squaring. To calculate $33^{1007} \bmod 5$,

$$\begin{align*} 33^1 &\equiv 3 \pmod 5\\ 33^2 &\equiv 3^2 \equiv4\\ 33^4 &\equiv 4^2 \equiv1\\ 33^8 &\equiv 1^2 \equiv 1\\ 33^{16} &\equiv 1^2 \equiv 1\\ 33^{32} &\equiv 1^2 \equiv 1\\ 33^{64} &\equiv 1^2 \equiv 1\\ 33^{128} &\equiv 1^2 \equiv 1\\ 33^{256} &\equiv 1^2 \equiv 1\\ 33^{512} &\equiv 1^2 \equiv 1\\ \end{align*}$$

This gets trivial only because it is $\bmod 5$, and so after the fourth power, every $33^{2^k} \equiv 1$. For other modulus, the results may be more interesting.

And to obtain $33^{1007} \bmod 5$,

$$\begin{align*} 33^{1007} &\equiv 33^{512+256+128+64+32+8+4+2+1}\\ &\equiv 1\cdot1\cdot1\cdot1\cdot1\cdot1\cdot1\cdot4\cdot3\\ &\equiv2 \pmod 5 \end{align*}$$