Modular exponentiation confusion

50 Views Asked by At

So I was having trouble with the following three problems but I think my problem in all three is the same:

a) Compute $323^{4097} \bmod 10$

b) Compute $22^{362} \bmod 12$

c) Compute $134^{121} \bmod 11$

So for a) I get that we have to set it to 3^4097 $mod 10$ But I'm not sure about the steps after that. I see that we split the exponent into $3$ * $(3^4)$^1024 but then I don't understand how the $3^4$ becomes a $1$, and therefore leaving $3$ as the final answer.

For b), once again, I understand how it is set to 10^362 $mod 12$ but then I don't understand the procedure afterwards. It made sense before because the exponent was odd and could, therefore, be split up but I am not sure how that would work here.

For c), I understand how it becomes 2^121 $mod 11$ but then I do not understand how to proceed further because the exponent $121$ is divisible by $11$ so it can not be split up.

Any help?

3

There are 3 best solutions below

0
On

For a: 3^4=81 which is congruent to 1 modulo 10. You usually look for a small power which simplifies you problem. For example, at c: 2^5=16 which is 3 modulo 11.

0
On

Use Euler's theorem: for any number $a$ prime to $n$, $a^{\varphi(n)}\equiv 1\mod n$, where $\varphi$ denotes Euler's totient function, hence $$a^r\equiv(a\bmod n)^{r\bmod\varphi(n)}\mod n.$$ Thus, in question $b)$ $\varphi(12)=4$, $22\equiv -2\mod 12$, and $$22^{362}\equiv (-2)^{2}=4\mod 12.$$

0
On

For c, $2^{121}=2\cdot (2^{12})^{10}$ and $(2^{12})^{10} \cong 1 \pmod{11}$ by Euler's theorem... so we get $2$...