Remainders and modulars

37 Views Asked by At

How do I find the remainder of $3^{2002}$ divided by $5$ using mod? I can solve the remainder of, for example, $7^{220}$ divided by $8$ because $7=-1 \pmod 8$, but that doesn't work here.

3

There are 3 best solutions below

0
On

Start with $3^2 \equiv -1 \pmod 5$, and the fact that $2002 = 2 \cdot 1001$.

0
On

Hint:

Use Little Fermat: $a^4\equiv 1\mod 5$ if $a$ is not divisible by $5$.

0
On

You can use the Eulero's function that in this case is equal to the Little Fermat. $$a^{\phi(m)}\equiv 1 \pmod m$$ if $a$ isn't a multiple of $5$