2

I am not able to write this in latex with the subscript p|n (maybe more than one line) under the product and above the product sign also I need something to be written( say k). Moreover it would be helpful if someone tells me how to display this formula in a neat manner. Thanks in Advance.

enter image description here

2 Answers2

2

The original picture can be reproduced by

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\frac{(-1)^{\varphi(n)/2}n^{\varphi(n)}}
     {\prod_{p\mid n} p^{\varphi(n)/(p-1)}}
\]
\end{document}

enter image description here

whereas using \Pi instead of \prod would give

enter image description here

which is sensibly different.

If the condition is desired to be under the product sign, the correct answer is

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\frac{(-1)^{\varphi(n)/2}\,n^{\varphi(n)}}
     {\prod\limits_{p\mid n} p^{\varphi(n)/(p-1)}}
\]
\end{document}

(note the thin space in the numerator and in the exponent at the denominator).

enter image description here

Using \displaystyle would give a much worse output, with a too big product sign

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\frac{(-1)^{\varphi(n)/2}\,n^{\varphi(n)}}
     {\displaystyle\prod_{p\mid n} p^{\varphi(n)/(p-1)}}
\]
\end{document}

enter image description here

egreg
  • 1,121,712
0

Exchange \Pi for \prod\limits or \displaystyle\prod

Also, you might want to use \begin{equation} or \begin{equation*} instead of [

  • This is basically the same as another already extant answer; moreover, we don't know if \Pi was actually used instead of \prod. – Paul Gessler Apr 04 '15 at 13:50
  • @PaulGessler The symbol used by the OP is *surely* \prod, because \Pi would sit on the baseline. – egreg Apr 04 '15 at 14:20