<s>[INST] Finding remainder when $10^{10}+10^{10^2}+.........+10^{10^{10}}$ is divided by $7$. I have found a new problem which asks:

Find the remainder when $10^{10}+10^{10^2}+.........+10^{10^{10}}$ is divided by $7$.

I am thinking to find the remainder using Fermet's theorem, but I think I am unable to do it.
Please help.
 [/INST] You are right. You should use Fermat's Little Theorem to solve this problem. Fermat's Little Theorem tells us $10^6 \equiv 1 \pmod{7}$, meaning that we can subtract $6$ from each power without affecting the remainder. This means we can just find the remainder of the powers when divided by $6$ and then use those powers.
$$10 \equiv 4 \pmod 6$$
$$10^2 \equiv 4^2 \equiv 16 \equiv 4 \pmod 6$$
$$10^3 \equiv 4^3 \equiv 64 \equiv 4 \pmod 6$$
Hopefully, you see the pattern. All of the powers are equivalent to $4 \pmod 6$. Thus, we can replace each $10^{10^a}$ with $10^4$, giving us a sum of $10\cdot 10^4=10^5$. Now, we need to compute $10^5 \pmod 7$:
$$10^5 \equiv 3^5 \equiv 243 \equiv 5 \pmod 7$$
</s>