Sum the series 9+99+999+9999+...to n terms?

Answers (2)

If n=10 then it becomes 100 + 1000 ... +10^9 = 1,111,111,110

Any other value for n is not so simple.

Votes: +0 / -0

Sum(10^k,k=0:n) - (n + 1) = (10 ^ (n+1) - 1) / (10 - 1) - (n + 1)

Formula is here:
math.stackexchange.com/questions/1929159/is-there-any-way-to-express-sum-i-1n-i-10i-1-without-sum

Votes: +0 / -0