Let \(S_n\) be the sum of the first \(n\) terms of an arithmetic sequence:
\[
S_n = u_1 + u_2 + \dots + u_n.
\]
Writing the sum forwards and backwards:
\[
\begin{aligned}
S_n &= a + (a + d) + (a + 2d) + \dots + [a + (n-1)d], \\
S_n &= [a + (n-1)d] + [a + (n-2)d] + \dots + a.
\end{aligned}
\]
Adding term by term gives \(n\) pairs, each equal to \(2a + (n-1)d\):
\[
2S_n = n\bigl(2a + (n - 1)d\bigr).
\]
So
\[
S_n = \frac{n}{2}\bigl(2a + (n - 1)d\bigr).
\]
Sum of the first \(n\) terms:
\[
S_n = \frac{n}{2}\bigl(2a + (n - 1)d\bigr)
= \frac{n}{2}(u_1 + u_n).
\]
Example 2
For the sequence \(4, 7, 10, 13, \dots\) from Example 1, find:
- (i) the 20th term,
- (ii) the sum of the first 20 terms.
Solution.
(i) \(u_n = 3n + 1\), so
\[
u_{20} = 3(20) + 1 = 61.
\]
(ii) \(a = 4\), \(d = 3\), \(n = 20\).
\[
\begin{aligned}
S_{20}
&= \frac{20}{2}\bigl(2\cdot 4 + (20 - 1)\cdot 3\bigr) \\
&= 10(8 + 57) \\
&= 10 \times 65 \\
&= 650.
\end{aligned}
\]
So the 20th term is \(\boxed{61}\) and the sum of the first 20 terms is \(\boxed{650}\).