How to type primed sum?

The amsmath package has documentation which suggests there are 2 choices, depending on whether your sum has limits or not.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[\sum\nolimits'\] %if no limits in the sum
\[ \sideset{}{'}\sum_{n<k,\;\text{$n$ odd}} nE_n \] %if limits in the sum
$\sum^{'}$
\end{document}

I would suggest typesetting the summation (together with its limits) first, and then add the prime:

enter image description here

\documentclass{article}
\begin{document}
\[
  \sum_{i=1}^{10}{}^{'} f(x) 
  \mbox{\quad or \quad} 
  \sum_{i=1}^{10}{\vphantom{\sum}}' f(x)
\]
\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

If the summation limits are too wide, this may cause the prime to shift away (further to the right). However, some use of \mathclap (from the mathtools package) would be able to clear this problem. You didn't mention it, so I didn't include it here. Just know that it is possible.


The amsmath manual (p. 15) recommends using sideset:

\usepackage{amsmath}
\sideset{}{'}\sum_{\text{whatever}} x

(This works when there are limits to the sum, unlike, er, \nolimits.)