0

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.

Blue
  • 75,673

1 Answers1

3

$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$.

J. W. Tanner
  • 60,406