<s>[INST] Find the value of $3+7+12+18+25+\ldots=$ Now, this may be a very easy problem but I came across this in an examination and I could not solve it.
Find the value of
$$3+7+12+18+25+\ldots=$$
Now here is my try
$$3+7+12+18+25+\ldots=\\3+(3+4)+(3+4+5)+(3+4+5+6)+(3+4+5+6+7)+\ldots=\\3n+4(n-1)+5(n-2)+\ldots$$
After that, I could not proceed.
 [/INST] The above sequence is given by $a_i = \frac{i(i+5)}{2}$. The finite sum is given by
\begin{align}
S_n & = \sum_{i=1}^n a_i \\
& = \frac{1}{2} \sum_{i=1}^n i^2 + \frac{5}{2} \sum_{i=1}^n i \\
& = \frac{n(n+1)(2n+1)}{12} + \frac{5n(n+1)}{4} \\
& = \frac{n(n+1)(n+8)}{6}
\end{align}
EDIT: (In response to comments) To a certain point, finding the formula for $a_i$ is trial and error. However, it is not difficult to note here that the difference of the difference of terms is always 1 (i.e. $\Delta^2 a_i = 1$). This implies that the dependence is quadratic. Using $a_i = A i^2 + B i + C$ we can determine the formula with three terms.
</s>