I am trying to understand the proof of a divisibility rule from this website. I've had very little exposure to modular arithmetic, so in order to attempt to understand the proof I spent the afternoon studying some modular arithmetic to get a simple understanding of a few of the theorems and the syntax.
Despite this I am not understanding how the proof from the above site goes from this: $$ 10^m \equiv1^m \equiv1(mod3)$$ To this: $$ (a_0+a_1*10+a_2*10^2...+a_n*10^n)\equiv1*(a_0+a_1+a_2...+a_n)(mod3)$$
I understand why the first statement is true, but I fail to see how it allows the second statement to be made. How is it that the second statement follows from the first?