This is LaTeX code:

[latex]
\displaystyle p_n=\sum_{k=1}^{\infty}pg^k p_{n-1}^k,~n\geq 2
[/latex]