How to put a symbol above another in LaTeX?
${a \atop \#}$
or
${a \above 0pt \#}$
Use \overset{above}{main}
in math mode. In your case, \overset{a}{\#}
.
If you're using #
as an operator, consider defining a new operator for it:
\newcommand{\pound}{\operatornamewithlimits{\#}}
You can then write things like \pound_{n = 1}^N
and get: