<s>[INST] How to deduce that $1\cdot 1 + 2\cdot 1 + 2\cdot 2 + 3\cdot 1+3\cdot 2+3\cdot 3 +...+(n\cdot n) = n(n+1)(n+2)(3n+1)/24$ I know how to reason $$1\cdot2 + 2\cdot3 + 3\cdot4 + n(n-1) = \frac{1}{3}n(n-1)(n+1)$$
However, I'm stuck on proving $$1\cdot1 + (2\cdot1 + 2\cdot2) + (3\cdot1+3\cdot2+3\cdot3) + \cdots +(n\cdot 1+...+n\cdot n) = \frac{1}{24}n(n+1)(n+2)(3n+1).$$
Could somebody shed some light on me?
 [/INST] You can do as the following :$$\begin{align}\sum_{k=1}^{n}k(1+2+\cdots+k)&=\sum_{k=1}^{n}k\cdot\frac{k(k+1)}{2}\\&=\frac 12\sum_{k=1}^{n}k^3+\frac 12\sum_{k=1}^{n}k^2\\&=\frac 12\left(\frac{n(n+1)}{2}\right)^2+\frac 12\cdot\frac{n(n+1)(2n+1)}{6}.\end{align}$$
</s>