The expression for an A.P. follows easily from the expression for the sum of numbers from $1$ to $n$:

$$S_n \equiv \sum_{k=1}^{n} \left( a+(k-1)d \right)$$
We can break up the sum, that is, take out the $a$ part and treat it separately.

$$S_n =\sum_{k=1}^{n} \left( a \right) + \sum_{k=1}^{n} \left( (k-1)d \right)$$

The first term is easy; you add $n$ copies of a constant to get $na$. We can pull the constant $d$ outside the second sum:

$$S_n =na + d\sum_{k=1}^{n} \left( (k-1) \right) = na + d\sum_{j=0}^{n-1} \left( j \right)$$

Finally, we apply our sum of integers formula $\sum_{j=0}^m j = \sum_{j=1}^m j = \binom{m+1}{2}$ to get

$$\sum_{j=0}^{n-1} \left( j \right) = \binom{(n-1)+1}{2} $$
So
$$
S_n = an + d\binom{n}{2} = a\binom{n}{1} + d\binom{n}{2}
$$

This can be extended for sequences where the first difference is itself an arithmetic progression, for example,
$$2+3+6+ 11+ 18 + 27 +\cdots $$
in which case there will now be an additional term in the answer involving $\binom{n}{3} $.