More on Sequences

The sums, or series, of a sequence is the sum of all or a part of the sequence's terms.

Three sum notations for a sequence whose name is $A$ are:

$$\sum_{a \in A} a = \sum_{i=1}^n a_i = \sum_{1 \le i \le n} a_i = a_1 + a_2 + a_3 + \dots + a_n.$$

The first notation is written in $\LaTeX$ as

$\sum_{a \in A} a$
("the sum of all $a$ in $A$") and the other two as
$\sum_{i=1}^n a_i$
and
$\sum_{1 \le i \le n} a_i$
("the sum of all $a_i$ such that $i$ goes from $1$ to $n$".)

Note how closely the sum notations resemble for loops in a programming language!
Fun class activity: How do you write $\sum_{a \in A} a$ as a for loop in Java/C++? What about $\sum_{i=1}^n a_i$?

Example: Let $S = \langle 7, 2, 5, 1\rangle$. Then, $\sum_{k=1}^4 s_k = \;$$7 + 2 + 5 + 1 = \;$$15$.