<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] Base case:
Prove true for n=1
$ 1 * 1 = \frac{1(1 + 1)(1 + 2)(3(1) + 1)}{24} $
Inductive step:
Assume for n = k, prove for n = k+1. If we let the property be equal to P(n)
$ P(k+1) = P(k) + ((k+1) * 1 + ... +(k+1)*(k+1)) $
$ P(k+1) = \frac{k(k + 1)(k + 2)(3k + 1)}{24} + ((k+1) * 1 + ... +(k+1)*(k+1)) $
From here you should be able to do the rest, ask if you have any more issues
</s>