# Placement of an apostrophe after a sum

I'm taking an algebra course in which we put an apostrophe after a sum to indicate that it is finite (not sure how standard this is), and I'm having trouble texing this. When writing a sum in math mode, I try

\sum\limits_i' a_i x_i

but it ends up putting the apostrophe on top of the sum instead of after it. Is there any way to put the index under the sum but the apostrophe to the side of it? Thanks.

EDIT: I want the apostrophe to appear after the capital Sigma, i.e. in the same place as it does if I were to write

$\sum' a_i x_i$

• Uhm... you could try with \sum\limits_{i'} a_i x_{i} or perhaps with \sum\limits_{i^{\prime}} a_i x_{i^{\prime}} Nov 24 '14 at 3:25
• Ah, apologies for my lack of clarity, but I don't want the apostrophe on the i. If I just do \sum' a_i x_i, then I get the apostrophe where I want it, but I'm not sure how to incorporate the \limits_i part into it. Nov 24 '14 at 3:59

You can use \sideset from the amsmath package:

\documentclass{article}
\usepackage{amsmath}
...
\begin{document}

$\sideset{}{'}\sum_{n<k,\;\text{n odd}} nE_n$
\end{document}


• I"m not sure why this has a down vote. I agree that it would be better if the solution was given as a minimal working example, but it's correct.
– user30471
Nov 24 '14 at 5:33
• Perfect, this is exactly what I was looking for. Thanks. Nov 24 '14 at 5:39
• Welcome to TeX.SE. Perhaps using \sideset{}{'}\sum_{\mathclap{n<k,\;\text{$n$ odd}}} nE_n might be a good idea so that there is not so much additional space after the \sum. This requires the mathtools package (which is useful as it fixes some amsmath issues also). Nov 24 '14 at 7:28