Finding the remainder of $123^{456}+78^9$ divided by $7$

121 Views Asked by At

Find the remainder when $123^{456}+78^9$ is divided by $7$.

This would be $123^{456}+78^9\pmod7,$ but is there any way to find some slick congruence? I don't really understand how to find congruences.

1

There are 1 best solutions below

1
On BEST ANSWER

$123^{456}\equiv1\bmod 7$ by Fermat's little theorem that $a^{p-1}\equiv1\bmod p$ if $a\not\equiv0\bmod p$.

$78^9\equiv1^9=1\bmod 7$, because $78=11\times7+1$.