2

I Need to find what the remainder is when $12^7+8^8$ is divided by $13$

I have a solution, but don't know if it is right. $12=-1\mod13$

$12^7=-1\mod13$

$8=8\mod13$

$8^2=6\mod13$

$8^4=10\mod13$

$8^8=9\mod13$

Then I did $-1\mod13+9\mod13=8\mod13$, so the remainder is $8$. If someone could tell me if this is correct, it would be appreciated. Thanks

user5954246
  • 1,135
Hannah
  • 21

2 Answers2

2

You are quite incorrect in your calculations. $8^2 \equiv -1 \pmod {13}$ in your second line.

However, there is an easier way you can proceed. $$12^{7}+8^8 \equiv (-1)^7+2^{24} \equiv -1+(2^{12})^2 \equiv -1+1 \pmod {13}$$ since $2^{12} \equiv 1 \pmod{13}$ from Fermat's Little Theorem.

S.C.B.
  • 22,768
0

By Fermat's Little Theorem we have $2^{12}=1\bmod13$. So $8^4=1\bmod13$ and hence $8^8=1\bmod13$. As you said, $12^7=(-1)^7=-1\bmod13$, so $12^7+8^8=0\bmod13$.

almagest
  • 18,380