The sum of n first numbers of the string 7,77,777,….

IMG_20140518_194752

 

 

 

 

 

 

Find the sum of  n first numbers of the string  7,77,777,….

7+77+777+...=7(1+11+111+...)=

=7(\frac{10-1}{9}+\frac{10^{2}-1}{9}+\frac{10^{3}-1}{9}+.....\frac{10^{n}-1}{9})=

=\frac{7}{9}\left ( 10+10^{2}+10^{3}+....10^{n}-1-1-1...-1 \right )=

=\frac{7}{9}\left ( 10+10^{2}+10^{3}+....10^{n}-n \right )=

=\frac{7}{9}\left ( 10\cdot \frac{10^{n}-1}{10-1}-n \right )=

=\frac{7}{9}\left ( \frac{10(10^{n}-1)}{9}-n \right )=

=\frac{7}{81}\left ( 10^{n+1}-10-9n \right )