How do I calculate the return given the discount factor and a sequence of rewards? I know that $G_t = R_{t+1} + G_{t+1}$.
Suppose $\gamma = 0.9$ and the reward sequence is $R_1 = 2$ followed by an infinite sequence of $7$s. What is the value of $G_0$?
As it's infinite, how can we deduce the value of $G_0$? I don't see the solution. It's just $G_0 = 5 + 0.9*G_1$. And we don't know $G_1$ value, and we don't know $R_2, R_3, R_4, ...$
You know all the rewards. They're 5, 7, 7, 7, and 7s forever. The problem now boils down to essentially a geometric series computation.
$$ 
G_0 = R_0 + \gamma G_1
$$
$$ 
G_0 = 5 + \gamma\sum_{k=0}^\infty 7\gamma^k 
$$
$$ 
G_0 = 5 + 7\gamma\sum_{k=0}^\infty\gamma^k 
$$
$$ 
G_0 = 5 + \frac{7\gamma}{1-\gamma} = \frac{5 + 2\gamma}{1-\gamma}
$$