Creating a Summation Expression with k and m Variables

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
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: 139
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.