<s>[INST] $1+(1+2+4)+(4+6+9)+(9+12+16)+.......+(361+380+400)=?$ I came across this question today.
$1+(1+2+4)+(4+6+9)+(9+12+16)+.......+(361+380+400)$=?
Now, my workout
If we simplify the expression it comes to be
$1+7+19+37+.....+1141$
Here we see that from the second term to the first term there is a difference of 6 and then from the third to the second term the difference is 12 and so on...
So we notice that the increase from one term to the other is in form of multiples of 6.ie 6+,12+.18+ and so on....
After that I could not proceed.
 [/INST] Let :
$$\text{S}= 1+7+19+37+\dots +a_n$$
$$\begin{align}~~~~~~~~~~~\text{-S}=~~~-1-7-19- \dots -a_{n-1}-a_n \end{align}$$
Adding these two :
$$0=1+6+12+18+ \cdots 6(n-1)-a_n$$
This gives $$a_n=1+6+12+18+ \cdots 6(n-1)$$
Now ,
$$a_n=1+6(1+2+3 \cdots (n-1))$$
$$a_n=1+6\cdot \frac{n(n-1)}2=3n^2-3n+1$$
$$S=\sum a_n= \sum \big(3n^2-3n+1\big) =3\sum n^2 - 3\sum n + \sum 1$$
Use $$\sum n^2 =\frac{n(n+1)(2n+1)}{6} $$
$$\sum n  =\frac{n(n+1)}{2}$$
$$\sum 1 =n$$
</s>