# How to typeset elementary combinatorics?

How would one typeset basic combinatorics, like variation and combination?

For example, when using $$V'_n^k$$ for variation with repetition, n and k are not vertically aligned. Something like $$V'\begin{smallmatrix}k\\n\end{smallmatrix}$$ comes close, but the spacing is a little to wide, and it isn't left-aligned.

So, what's the best or usual way to do this? (Preferably also working with MathJax.)

-
Have you tried $${V'}_n^k$$? –  Mico Jan 6 '12 at 2:55
Mico, thank you, that works! (I even remember thinking about it, but somehow I managed to forget about giving it a try.) Will you make that an answer, so I can accept it? –  danlei Jan 6 '12 at 3:15

I suggest the following code:

$${V'}_n^k$$

-
No problem. Let's just delete our comments; you go first. –  Mico Jan 6 '12 at 10:46