# Recurrence $A_{n+1}=A_{n}+\mathbf{E}G_n$

This looks like a straightforward recurrence, but I have an impression I made a mistake somewhere. In this equation $G_n$ is a random variable

$G_n=\left\{ \begin{array}{c c} 0 & 1-p_n \\ a_n & p_n \\ \end{array} \right.$

Obviously $\mathbf{E}G_n=a_n p_n$ and border condition is $A_1=1$. So the obvious solution to the problem seems to be

$A_{n+1}=1+\sum_{j=2}^{n}a_j p_j$

I find this solution way too simple. Do I have to use a generating function somewhere? I had this article in mind when thinking of this problem.

-
You should be summing from $j=1$, as $A_2 = A_1 + \mathbb{E}(G_1) = 1 + a_1 p_1$. –  Sasha Oct 4 '11 at 14:52
I really fail to see what it is you are asking here ? –  Sasha Oct 4 '11 at 14:53
Apart from a typo in the index of summation, the calculation in the post is fine. The answer is simple, there is no need to complicate it. There are enough hard problems. –  André Nicolas Oct 4 '11 at 18:43