MHB Creating a Summation Expression with k and m Variables

AI Thread Summary
The discussion focuses on writing mathematical expressions using LaTeX syntax, particularly the use of summation notation. Participants explore different formatting options to improve the appearance of equations. Key points include the use of the \sum command with specific conditions for prime numbers and the importance of spacing and sizing for clarity. Suggestions include using the \substack command for better alignment of conditions in summations. The conversation also highlights the distinction between plain TeX commands and LaTeX environments, emphasizing the flexibility of the subarray environment for aligning subscripts. Overall, the goal is to enhance the readability and presentation of mathematical expressions in LaTeX.
alyafey22
Gold Member
MHB
Messages
1,556
Reaction score
2
How to write something similar to the following

View attachment 1121

Or is it better to write

$$\sum_{n=k ,m=1}^{k+1}$$
 

Attachments

  • multi-indexed sum.PNG
    multi-indexed sum.PNG
    1.4 KB · Views: 110
Last edited:
Physics news on Phys.org
Try this syntax that produces the following output:

\large \sum_{p^{m} \le x \atop \text{p is prime }m \ge 1 }

$$\large \sum_{p^{m} \le x \atop \text{p is prime }m \ge 1 } $$

The spacing and sizing could use a little work but it's a good start for now.

EDIT: Just found another one on the same page. Try this code as well:

\large \sum_{\substack{p^{m} \le x \\ \text{p is prime }m \ge 1}}

$$\large \sum_{\substack{p^{m} \le x \\ \text{p is prime }m \ge 1}}$$
 
There is also the subarray environment, which is similar to the regular array environment. It allows aligning the subscripts left or right.

\atop is a plain TeX command.
 

Similar threads

Back
Top