An archer shoots at a target. It may be assumed that each shot is independent of all other shots and that, on average, she hits the bull’s-eye with probability $p$. The total number of shots when she hits the bull’s-eye for the third time is denoted by $Y$.
Suppose I want to derive the probability generating function $G_Y(t)$ of $Y$ in order to determine $\mathrm{E}(Y)$ and $\mathrm{Var}(Y)$ and other related results:
I know that for $r\geqslant 3$, $\mathrm{P}(Y=r)=\frac{1}{2}(r-1)(r-2)p^3q^{r-3}$, where $q=1-p$, thus $$G_Y(t)=\mathrm{E}(t^Y)=\sum_{r=3}^{\infty}t^r\times\frac{1}{2}(r-1)(r-2)p^3q^{r-3}$$
$$\Rightarrow G_Y(t)=\frac{1}{2}p^3t^3\sum_{r=3}^{\infty}(r-1)(r-2)\left(qt\right)^{r-3}$$
How would one proceed to sum this series to obtain an expression for the PGF in a simplified form?
The formula for the sum of a geometric series is $$\sum_{n = 1}^{\infty}x^{n-1} = \dfrac{1}{1-x} \quad \text{for} \quad |x| < 1.$$ Differentiating w.r.t. $x$ twice gives us $$\sum_{n = 3}^{\infty}(n-1)(n-2)x^{n-2} = \dfrac{2}{(1-x)^3} \quad \text{for} \quad |x| < 1.$$ Assuming $|qt| < 1$ in your problem, you can simply apply the above formula for $x = qt$.