[Tex/LaTex] How to typeset the limit of a sequence like so

math-mode

I want to write this:

enter image description here

I tried with $x_n \to_{n \to 0} 0$ but the $n \to 0$ doesn't go under the right arrow, it goes under but on the right, and I want it under but in the center, as in the picture above.

Best Answer

You can also use the function \xrightarrow:

$ x_n \xrightarrow[n \to 0]{} 0$

Result

The user's guide of the amsmath package says :

\xleftarrow and \xrightarrow produce arrows that extend automatically to accommodate unusually wide subscripts or superscripts. These commands take one optional argument (the subscript) and one mandatory argument (the superscript, possibly empty)"

Related Question