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.

Observe that $\gcd(10,7)=1$.
Therefore by Euler's theorem: $10^{\phi(7)}\equiv1\pmod7$.
Since $7$ is prime: $\phi(7)=7-1=6$.
Therefore: $10^6\equiv1\pmod7$.
Therefore:


*

*$10^{10^{1}}\equiv10^{6\cdot1+4}\equiv(\color\red{10^{6}})^{1}\cdot10^{4}\equiv\color\red1^{1}\cdot10^{4}\equiv10000\equiv4\pmod7$

*$10^{10^{2}}\equiv10^{6\cdot16+4}\equiv(\color\red{10^{6}})^{16}\cdot10^{4}\equiv\color\red1^{16}\cdot10^{4}\equiv10000\equiv4\pmod7$

*$10^{10^{3}}\equiv10^{6\cdot166+4}\equiv(\color\red{10^{6}})^{166}\cdot10^{4}\equiv\color\red1^{166}\cdot10^{4}\equiv10000\equiv4\pmod7$

*$\dots$


We can easily prove by induction that $\forall{n\in\mathbb{N}}:10^{10^{n}}\equiv4\pmod7$.
Therefore: $\sum\limits_{n=1}^{10}10^{10^{n}}\equiv\sum\limits_{n=1}^{10}4\equiv40\equiv5\pmod7$.
