[Tex/LaTex] Prime on the product symbol

superscripts

I want to have a primed product symbol, i.e. something like

$\prod^\prime$

but it puts the prime on top of the product symbol instead of next to it (as a superscript, as it usually works). Does anyone know how to do this?

Best Answer

The amsmath package has a \sideset command for this purpose:

Sample output

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation*}
  \sideset{}{'}\prod_{n=-k}^k \frac{a_n}{n}
\end{equation*}

\end{document}

The general syntax is

\sideset{_a^b}{_c^d}\sum

producing

Full sample

and works on any large operator \prod, \sum, etc.

Related Question