Paragraph

Since there are \(n-1\) terms, we get

\begin{equation*} 2S = (n-1)(4n+4)\qquad \mbox{ so } \qquad S = \frac{(n-1)(4n+4)}{2}\text{.} \end{equation*}
in-context