Prove $3^n$ divides any number formed from $3^n$ identical digits I know this is a repost of this, however I had some trouble understanding the answers as I am new to number theory. I asked my doubt in a comment but got no reply.
One of the answers says:

A number whose digits are all equal and of length $3^n$ is thus of the
  form $c = \sum\limits_{i=0}^{3^n-1} a \cdot 10^i = a \dfrac{10^{3^n}-1}{10-1}$ by the geometric series.
Since we have to account for the possibility that $a = 1$ we need to
  show that $3^n \mid \dfrac{10^{3^n}-1}9$, i.e. $3^{n+2} \mid 10^{3^n}-1$.
This we can do by induction: Base case is trivial, suppose $3^{n+2}\mid 10^{3^n}-1$.
Then we have $10^{3^n} \equiv 1 \pmod {3^{n+2}}$, and so: $10^{3^n}\equiv 1 + k 3^{n+2} \pmod {3^{n+3}}$. Now compute $10^{3^{n+1}} = \left(10^{3^n}\right)^3$ modulo $3^{n+3}$.

I can't understand how can we write $10^{3^n} \equiv 1 \pmod {3^{n+2}}$ as $10^{3^n} \equiv 1 + k 3^{n+2} \pmod {3^{n+3}}$. And how to proceed further to prove $10^{3^{n+1}} \equiv 1$ (mod $3^{n+3})$. I figured we could cube both sides of $10^{3^n} \equiv 1 + k 3^{n+2} \pmod {3^{n+3}}$, however it leads to a lot of extra terms on right hand side of the equation.

We have
$$\frac{10^{3^{n+1}}-1}9=\frac{a^3-1}9=\frac{10^{3^n}-1}9(a^2+a+1)$$
where $a=10^{3^n}$. The induction step boils down to confirming that
$3$ divides $a^2+a+1$. If we could prove that $a\equiv1\pmod 3$ we could
confirm that.
