What are $2222^{5555}+5555^{2222} \pmod 7$ and $9^{2n+1}+8^{n+2} \pmod{73}$? Tell me hint for solve :
1) $ 2222^{5555}+5555^{2222} \equiv \mathord? \pmod 7$
2) $ 9^{2n+1}+8^{n+2} \equiv \mathord ?\pmod{73}$
thank you.

For problem 1) You can show by elementary division that $$2222 \equiv 3 \mod 7$$
Now $$3^6 \equiv 1 \mod 7$$
And therefore (all mod 7)
$$2222^{5555} \equiv 3^{5555} \equiv 3^{6\times 925+5} \equiv 3^5 \mod 7 $$
Now since inverse of 3 is 5 in mod 7, the above becomes $3^6.3^{-1}\equiv 5 \mod 7$
Similarly you can show $5555 \equiv 4 \mod 7$. Now $4^3 \equiv 1\mod7$. So
$$5555^{2222} \equiv 4^{2222} \equiv 4^{3\times 740+2} \equiv 4^2 \equiv 2 \mod 7$$
Therefore the sum will be $0 \mod 7$. This means that it is divisible by 7.
