This is LaTeX code:
[latex]
a_0 = e,\ a_n = \frac{a_{n-1}+q}{2} = \frac{e}{2^n} + q \frac{2^n-1}{2^n}
[/latex]