# Help find sum to infinity of a series - odd numbers with a common ratio

I am trying to derive the formula for the variance of a geometric distribution and am stuck at the following problem:

I need to find the sum to infinity for the following series:

$1+3(1-p)+5(1-p)^2+7(1-p)^3+\dots$ where $p$ where $p$ is a constant $0<p<1$

The series looks like the sum of the odd numbers and the sum of a geometric series (with common ration $(1-p)$) combined.

I don't know how to deal with such series. Please tell me how to solve this.

Write $q = \sqrt{1-p}$. Then your series becomes

$$1\cdot q^0 + 3\cdot q^2 + 5\cdot q^4 + 7\cdot q^6 +\dotsb = \sum_{k=0}^\infty (2k+1)\cdot q^{2k}.$$

The latter is easily recognised as

$$\frac{d}{dq} \sum_{k=0}^\infty q^{2k+1} = \frac{d}{dq} q\sum_{k=0}^\infty (q^2)^k = \frac{d}{dq} \frac{q}{1-q^2} = \frac{(1-q^2) -(-2q)q}{(1-q^2)^2} = \frac{1+q^2}{(1-q^2)^2}.$$

Now insert $q^2 = 1-p$ to obtain

$$\frac{2-p}{p^2}.$$

Sketch:

Let $T=\sum_{k=0}^\infty (2k+1)q^k$ be the series you want to evaluate ($q=1-p$) and $S=\sum_{k=0}^\infty 2kq^k$. We have $$T=S+\sum_{k=0}^\infty q^k,$$ where we can calculate the second series with the formula for geometric series. So you can figure out $T$ by calculating $S$. Now $$S=2\sum_{k=0}^\infty kq^k=2q\frac{d(\sum_{k=0}^\infty q^k)}{dq}$$ Again, you can evaluate the last bit by using the formula for geometric series and differentiating the result.