[tex]a_n=111....11=10^0+10^1+10^2+...+10^{n-1}= \frac{10^n-1}{9} \\
Sn=a_1+a_2+...+a_n= \frac{1}{9} (10^1-1+10^2-1+...+10^n-1)=\\
=\frac{1}{9} (10^1+10^2+...+10^n-n)=\\
=\frac{1}{9} (10\cdot \frac{10^n-1}{9}-n )=\\
= \frac{1}{81} (10^{n+1}-9n-10)[/tex]