I want to write this equation from the image.
This is what I tried but I am getting an error about math mode only
\begin{equation}
v_\pi(s) = \mathbb{E}(G\textsubscript{t}\mid S\textsubscript{t} = s) =
\mathbb{E}\textsubscript{\pi} (\sum_{n=0}^{+\infty} \gamma^k R\textsubscript{t+k+1} \mid S\textsubscript{t} = s)
\end{equation}
\textsubscript
? It should beR_{t+k+1}
and similarly in the other cases.