# index of summation

$$\sum_{i=1}^{n}$$
in this case the {n} is unnecessary, 'cause is just one element; if you want to type something like $\sum_{i=1}^{n-1},$ then you require to add the brackets {} for n-1.