Show that $2222^{5555} + 5555^{2222}$ is divisible by $ 7$ [duplicate]
Solution 1:
Use modular arithmetic, plus some remarks on the particular numbers involved:
First note that $5555=55\times101$ and $2222=22\times101$, hence
$5555\equiv -1\times 3=-3 \mod 7,\quad 5555\equiv 1\times -1=-1 \mod 6$
$2222\equiv 1\times 3=3 \mod 7,\quad 2222 \equiv 4\times -1 \equiv 2 \mod 6$
By Little Fermat, $x^{5555}\equiv x^{5555\bmod 6}=x^{-1}$, $\quad x^{2222}\equiv x^{2222\bmod 6}=x^{2}$. Thus $$ 2222^{5555}+5555^{2222}\equiv 3^{-1}+(-3)^2\equiv 5 +2 \equiv 0 \mod 7.$$
Solution 2:
You may use modular arithmetic for such questions involving huge numbers.
$$2222^{5555} ≡ 3^{2222} \pmod{7}.$$ Since $$3^6 ≡ 729 ≡ 1\pmod{7}, 3^{2222} ≡ 3^{6*925} * 3^5 ≡ 243 ≡ 5 \pmod{7}.$$ Also $$5555^{2222} ≡ 4^{2222} \pmod{7}$$ $$4^3 ≡ 64 ≡ 1 \pmod{7}, 4^{2222} ≡ 4^{3*740}*4^2 ≡ 16 ≡ 2\pmod{7}.$$ Adding them up, $$5555^{2222} + 2222^{5555} ≡ 2+5 ≡ 7 ≡ 0 \pmod{7},$$ hence proving the divisibility.