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

  • 1
    Welcome to TeX.SX! you can get the lower-limit form of the "subscript" to the product by specifying either \limits or \displaystyle. but really, you should show us what you have already tried, in the form of a "minimum working example", starting with \documentclass and ending with `\end{document}. – barbara beeton Apr 4 '15 at 12:48
  • @Werner Actually, it is not a duplicate as adding \displaystyle to the denominator does not fix the problem. – Andrew Apr 4 '15 at 13:36
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

|improve this answer|||||
0

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

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

|improve this answer|||||
  • 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 4 '15 at 13:50
  • @PaulGessler The symbol used by the OP is surely \prod, because \Pi would sit on the baseline. – egreg Apr 4 '15 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.