More on Sequences

In a general case, the sum of an arithmetic sequence of the form $A = \langle a_1, a_2, a_3, \dots, a_n\rangle = $$\langle a_1, a_1 + d, $$a_1 + 2d, $$\dots, $$a_1 +d\cdot(n-1)\rangle$, where $d$ is the common difference, is$$\sum_{a \in A} a = \frac{n\cdot[2a_1 + d\cdot(n-1)]}{2} = \frac{n(a_1 + a_n)}{2}.$$


Let's get back to $S = \langle1, 2, 3, \dots, n\rangle$. If you apply the product notation to $S$, you get $\boldsymbol n$ factorial: $$n! = \prod_{i=1}^n i = 1 \cdot 2 \cdot 3 \cdot \dots \cdot n.$$ Note that $0! = 1$, $1! = 1$, $2! = 2\cdot1 = 2$, etc. It doesn't have a formula, but most calculators have an $n!$ button.