This is LaTeX code:

[latex]
x_n =a+\frac{a^2}{2} + \cdots +\frac{a^n}{n}
[/latex]