How do I calculate the reminder (mod)

282 Views Asked by At

I want to calculate the reminder for high power value using casio (fx-991es) Ex: $$ 87^{17} \ \bmod 77 $$

This method not working because the number is too large Ex: $$ 9/2=4.5= 4-4.5=0.5= 0.5*2=1 $$

2

There are 2 best solutions below

2
On

You could go about like this:

$$ 87^{17}\equiv_{77} 10^{17}=10\cdot(10^2)^8=10\cdot100^8\equiv_{77}=10\cdot23^8 $$ then since $23^2=529\equiv_{77}67$ we have $$ 10\cdot(23^2)^4\equiv10\cdot67^4 $$ and you keep on like this always reducing the base by breaking up the exponent.

Hope this helps

0
On

$87^{17} \equiv 10^{17} \pmod{77}$

$10^2 \equiv 23 \pmod{77}$

$10^4 \equiv (10^2)^2 \equiv 23^2 \equiv 67 \pmod{77}$

$10^8 \equiv 67^2 \equiv 23 \pmod{77}$

$10^{16} \equiv 23^2 \equiv 67 \pmod{77}$

$10^{17} \equiv 10^{16} \cdot 10 \equiv 67 \cdot 10 \equiv 54 \pmod{77}$