Module Exponential problem

48 Views Asked by At

Here is the problem:

$ 445^{445} + 225^{225} $ mod 7

So, I know how to calculate this $445^{445}$ and this $225^{225}$ separately. But i don't know how to add them and then mod 7.

In other words i can do $445^{445}$ mod 7 and $225^{225}$ mod 7, but I don't know how to add them first, than mod 7.

Can anyone please help me?

2

There are 2 best solutions below

0
On BEST ANSWER

By Fermat's little theorem, $a^6 \equiv 1 \pmod 7 $

So $445^{445} + 225^{225} \equiv (445 \mod 7)^{445 \mod 6} +(225 \mod 7)^{225 \mod 6} \equiv 4^1+(1)^3 \equiv 5 \pmod 7$

0
On

You're almost there: $$x+y \mod n \equiv (x \mod n) + (y\mod n) \mod n$$