TeX source:
S_{n}=a_{1}+\left(a_{1}+d\right)+\left(a_{1}+2 d\right)+\ldots+\left(a_{n}-d\right)+a_{n}