Serie of 1

S = 1 + 11 + 111 + 1111 + …………….+ 1(N times 1 )

How to calculate  the sum of N terms  ?

you can start by looking at 9 * S = 9 + 99 + 999 + 9999 + …….

Which could be rewriten as : 9 * S = (10 -1) + (100 – 1 ) + (1000 -1) + …….. +

9S +1 =  1 + 10 + 10 ^2 + 10  ^ 3 + …. + 10 ^ N +  ( – N )

9S+1 + N  =  1 + 10 + 10 ^2 + 10  ^ 3 + …. + 10 ^ N = ( 1 – 10 ^ N+1) / (1 -10)

Advertisements