Finding the remainder of $N= 10^{10}+10^{100}+10^{1000}+\cdots+10^{10000000}$ divided by $7$ $$N= 10^{10}+10^{100}+10^{1000}+\cdots+10^{10000000}$$. What is the remainder when N is divided by 7?
$$N=(10^{10}+10^{100}+10^{1000}+\cdots+10^{10000000})/7$$
$$Rem[3^{10}+3^{100}+\cdots+3^{10000000}]/7$$
Now I did not understand it from the next step
Now in the next step it has been given
$Rem[3\cdot 3^9+3\cdot3^{99}+\cdots+3\cdot3^{9999999}]/7$
$Rem[\underbrace{(-3)+(-3)+\cdots(-3)}_{7~\text{times}}]/7$

Here I will use notation common for modular arithmetic.
Given $A$ and $a$ integers and $n$ a natural number different from $0$, the following are equivalent:


*

*$(A-a)$ is a multiple of $n$

*$(a-A)$ is a multiple of $n$

*$n$ divides evenly into $(A-a)$

*the remainder of $(A-a)$ when divided by $n$ is zero

*$A-a\equiv 0\pmod{n}$

*$A\equiv a\pmod{n}$

*There exists some integer $k$ such that $A-a=k\cdot n$

Some basic properties of modular arithmetic:
If $A\equiv a\pmod{n}$ and $B\equiv b\pmod{n}$ then the following are true:


*

*$A+B\equiv a+b\pmod{n}$

*$A\cdot B\equiv a\cdot b\pmod{n}$

*$A^k\equiv a^k\pmod{n}$


That is to say, we can replace summands or multiplicands with things which are modularly equivalent to them as we wish.
Note: The following is not true in general: $A^B\equiv A^b\pmod{n}$.  Exponents follow different rules and cannot be replaced with things they are equialent to modulo $n$, but could be replaced by something else if you are careful and spot the appropriate pattern.  See for example Fermat's Little Theorem.

Now, back to your problem, we notice first that $3^3=27=28=4\cdot 7-1$.  We try to rewrite this in a convenient fashion for use in modular arithmetic.  Well... $7\equiv 0\pmod{7}$ so...
$3^3\equiv 4\cdot \color{red}{7}-1\equiv 4\cdot \color{red}{0}-1\equiv 0-1\equiv -1\pmod{7}$ where here we replaced $7$ with $0$ since they are equivalent modulo $7$ and we made normal arithemtical simplifications.
Further, we notice by looking at powers of $3^3$ that:
$3^{99\dots 9}\equiv (3^3)^{33\dots3}\equiv (3^3)^{\text{some even number}}\cdot (3^3)\equiv (-1)^{\text{some even number}}\cdot (-1)\pmod{7}$
Here, we used the property that we can replace bases of exponents with something they are equivalent to modulo $7$.  Noticing further that $(-1)$ to an even power is just $1$ we can simplify further.
This tells us that $3^{99\dots 9}\equiv -1\pmod{7}$ for any number of the form $99\dots9$ regardless the length.  (It could be more rigorous, if you need I'll provide full details but I expect this is fine.)
Now, notice that by basic properties of exponents we have $3^{10^n}=3\cdot 3^{10^n-1}$ is of the form $3\cdot 3^{99\dots 9}$ for any $n\geq 1$ so we have:
$3^{10}+3^{100}+3^{1000}+\dots \equiv 3\cdot 3^{9}+3\cdot 3^{99}+3\cdot 3^{999}+\dots$
$\equiv 3\cdot (-1)+3\cdot (-1)+3\cdot (-1)+\dots\pmod{7}$
Again using the fact that we can replace multiplicands with something they are equivalent to.  Now, we make normal arithmetic simplifications:
$\equiv 7\cdot (3\cdot (-1))\equiv 0\cdot (3\cdot (-1))\equiv 0\pmod{7}$
