Raised ellipsis

What's next in the following sequence of LaTeX commands: \ldots, \cdots?

That is, I want an ellipsis at the top instead of in the middle or the bottom. The specific situation I have is f^{'''\cdots''}, which renders the ellipsis too low (and with odd horizontal spacing, which I know how to tweak).

-
Did you try f^{'''\textsuperscript{$\cdots$}''}? –  Sigur Jan 24 '14 at 17:44
@Sigur, I just used your precise code, but this leaves the final '' higher than the initial ones. –  vadim123 Jan 24 '14 at 17:47
Even outside the superscript? –  Sigur Jan 24 '14 at 17:48
I have no explanation, but yes it is so. –  vadim123 Jan 24 '14 at 17:49
Note that f^{'} is already wrong, it should be f'; the same for multiple primes: f'', f''' and so on. –  egreg Jan 24 '14 at 18:21

you're using the right quote inside the superscript. that will make the primes too small. you should use \prime instead.

is this more like what you want?

this was produced with

$f^{\prime\prime\prime\cdots\prime\prime}$


explanation: the right quote is a shorthand for $^\prime$, and special treatment is given to multiple right quotes so that they won't be recognized as multiple superscripts (which are considered an error).

-
Very nice, not only answers the question but has a good lesson. –  vadim123 Jan 24 '14 at 17:59

You could try f'''^{\cdots}{}'':

\documentclass{article}
\begin{document}
$f'''^{\cdots}{}''$
\end{document}

-
The final primes might end up at a different height than the starting ones. –  egreg Jan 24 '14 at 18:24
@egreg - Under which conditions might the final primes be at a different height than the first few ones? FWIW, the five primes in the example are all on the same height. –  Mico Jan 24 '14 at 18:41
It depends on the height of the math atom to which the leading primes are appended to; the trailing ones are appended to an empty atom no matter what the original atom is. –  egreg Jan 24 '14 at 22:50

Note the use of {} to avoid some strange bug.

$f^{'''\textsuperscript{$\cdots$}{}''}$


Without the empty braces {} we obtain

As @barbara beeton said you don't need to use powers. But even in this case you have to use an empty pair of braces. Compare

$f'''\textsuperscript{$\cdots$}{}''$
$f'''\textsuperscript{$\cdots$}''$


-
What a weird hack, but I admit it works. I will wait to see if there is a more natural solution before accepting. –  vadim123 Jan 24 '14 at 17:53
Sorry, but this is not really what I'd call a solution. –  egreg Jan 24 '14 at 18:20
@egreg, well it was only using my small knowledge. :) I'm always learning. –  Sigur Jan 24 '14 at 18:21