How to display a position of a vector like this?

How to display a smile symbol like this? For example, the k_2th place is a_1.

-

Use \overset and \substack:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\place}[2]{%
\overset{\substack{#1\\\smile}}{#2}%
}

\begin{document}
$(\place{1}{a_{1}},a_{2},\dots,\place{k_{2}}{a_{1}}, a_{2},\dots,\place{k_{3}}{a_{2}}, a_{3},\dots,\place{k_{r+1}}{a_{r}}, b_{m+1},\dots,b_{n})$
\end{document}


-