Prove $$N_n \equiv\frac{n(n+1)}{2}\mod 9$$ where $N_n$ is the number obtained by writing 1 to n one after the other. For example, $$N_{12} = 123456789101112$$
My Attempt: First, I listed the first ones: $$N_1=1\equiv 1\mod 9$$ $$N_2=12\equiv 3\mod 9$$ $$N_3=123\equiv 6\mod 9$$, and the remainder did match the pattern $\frac{n(n+1)}{2}$. So I tried to do proof by induction. Assume $$N_k \equiv\frac{k(k+1)}{2}\mod 9$$, then I figured out that $$N_{k+1} = 10^{\lfloor \log_{10}(k+1)+1\rfloor}N_k + k+1$$, so I need to prove $$10^{\lfloor \log_{10}(n+1)+1\rfloor}N_k + k+1 \equiv \frac{(k+1)(k+2)}{2} \mod 9 $$ But got lost from here...Maybe induction is not the best way to proof this.
Hint Since $10 \equiv 1 \pmod{9}$, for any $k$ you have $$10^kN_n+(n+1) \equiv N_n +(n+1) \pmod{9}$$