Find the sum of the first n terms of the series: 3 + 7 + 13 + 21 + 31 + …
The given series is 3 + 7 + 13 + 21 + 31 + …
$S=3+7+13+21+31+\ldots+a_{n-1}+a_{n}$
$S=3+7+13+21+\ldots+a_{n-2}+a_{n-1}+a_{n}$
On subtracting both the equations, we obtain
$S-S=\left[3+\left(7+13+21+31+\ldots+a_{n-1}+a_{n}\right)\right]-\left[\left(3+7+13+21+31+\ldots+a_{n-1}\right)+a_{n}\right]$
$S-S=3+\left[(7-3)+(13-7)+(21-13)+\ldots+\left(a_{n}-a_{n-1}\right)\right]-a_{n}$
$0=3+[4+6+8+\ldots(n-1)$ terms $]-a_{n}$
$a_{n}=3+[4+6+8+\ldots(n-1)$ terms $]$
$\Rightarrow \mathrm{a}_{\mathrm{n}}=3+\left(\frac{\mathrm{n}-1}{2}\right)[2 \times 4+(\mathrm{n}-1-1) 2]$
$=3+\frac{(n-1)}{2}(2 n+4)$
$=3+(n-1)(n+2)$
$=3+\left(\mathrm{n}^{2}+\mathrm{n}-2\right)$
$=n^{2}+n+1$
$\therefore \sum_{k=1}^{n} a_{k}=\sum_{k=1}^{n} k^{2}+\sum_{k=1}^{n} k+\sum_{k=1}^{n} 1$
$=\frac{n(n+1)(2 n+1)}{6}+\frac{n(n+1)}{2}+n$
$=n\left[\frac{(n+1)(2 n+1)+3(n+1)+6}{6}\right]$
$=n\left[\frac{2 n^{2}+3 n+1+3 n+3+6}{6}\right]$
$=n\left[\frac{2 n^{2}+6 n+10}{6}\right]$
$=\frac{n}{3}\left(n^{2}+3 n+5\right)$