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.
 A: 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$$
A: 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$.
A: Yes, You can use Fermat's theorem here. 
By Fermat's theorem, $10^6\equiv 1 \pmod 7$.
Hence, $10^{6m}\equiv 1 \pmod 7$ for all $m$.
Now, $$10\equiv 4 \pmod 6, 10^2\equiv 40 \equiv 4 \pmod 6$$
By induction, $10^n \equiv 4 \pmod 6$ for all $n$
Thus, $10^n=6m+4$
and $$10^{10n}=10^{6m}\times10^4\equiv 10^4 \pmod 7 \equiv 4 \pmod 7$$
Consequently,
$$10^{10}+10^{10^2}+..........+10^{10^{10}} \equiv 4 \times 10 \pmod 7\equiv 5 \pmod 7$$
So, remainder is $5$.
A: Hint $\ \ \color{#0a0}{a^{\large 9}\equiv\bf 1}\,\Rightarrow\,a^{\large 10^{\Large N}}\!\!\equiv a\ \ $ 
by $\ \ \overbrace{a^{\large\color{#c00}{10^{\Large N}}}\equiv a^{\large \color{#c00}{1+9K}}}
^{\ \ \ \large \color{#c00}{10^{\large N}}\, \equiv\, \color{#c00}{1}           \pmod{\!\color{#c00} 9}}
\!\equiv a(\color{#0a0}{a^{\large 9}})^{\large K}
\!\equiv a (\color{#0a0}{\bf 1})^{\large K}
\!\equiv a$
