# Approximate a series with finite number of terms

How it is possible to approximate:

$$\sum_{i=1}^{NR}{i\cdot \left( \dfrac{1}{1-p} \right)^i}$$

-
Yes, sorry. $p \in [0,1]$ and $NR$ positive integer, bounded to a given value, 10000 for example. –  Claudio Fiandrino May 17 '12 at 8:25

Let $x = \dfrac1{1-p}$ and let $n = NR$. Then we are interested in the sum $\displaystyle \sum_{i=1}^{n} i x^i$.
Replacing $x$ by $\dfrac1{1-p}$ and $n$ by $NR$, we get that the solution is $$\left( \frac{NR}{p} - \frac1{p^2} + \frac1p \right) \left( \dfrac1{1-p}\right)^{NR} + \frac1{p^2} - \frac1p$$