the question is "the sum of all possible products of the first n natural numbers taken two at a time is?" and this is how I approached it:
first i selected the first number as 1
therefore $\Sigma$ 1*n = 2+3+4+5......n = (n-1)(n+2)/2
then selected 2 as first number
$\Sigma$ 2*n = 6+8=10+12....2n = (n-2)(2n+6)/2
then selected 3
$\Sigma$ 3*n= 12+15+18+21......3n = (n-3)(3n+12)/2 and so on, so the general term of the sums is (n-k)(kn+k(k=1)), where k varies from 1 to n-1. treating n as a constant
so the sum of all possible products is $\Sigma$ (n-k)(kn+k(k=1)), where k varies from 1 to n-1. solving that we get n(n-1)(n+1)(3n+2)/24
but the given answer is n(n+1)(2n-1)(n+3)/24
First, we begin by noting the following sum:
$$\left(\displaystyle\sum_{i=1}^n i\right)^2 = \sum_{i=1}^n i^2 + 2\underbrace{\sum_{i=1}^{n-1}i(i+1)}_\text{this is the sum we want}$$
Here, the first two sums have well-known results (these results can also be proven by induction) as follows: $$\left(\displaystyle\sum_{i=1}^n i\right)^2=\left(\frac{n(n+1)}{2}\right)^2$$ $$\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$$
Now, to get the sum we want, we simply subtract these values, like so:
\begin{align*} \sum_{i=1}^{n-1}i(i+1) &=\frac{1}{2}\cdot\left(\left(\displaystyle\sum_{i=1}^n i\right)^2 - \sum_{i=1}^n i^2\right)\\ &=\frac{1}{2}\cdot\left(\left(\frac{n(n+1)}{2}\right)^2-\frac{n(n+1)(2n+1)}{6}\right)\\ &=\left(\frac{n(n+1)}{4}\right)\cdot \left[\left(\frac{n(n+1)}{2}\right)-\frac{2n+1}{3}\right]\\ &=\left(\frac{n(n+1)}{4}\right)\cdot \frac{3n^2-n-2}{6}\\ &=\frac{n(n+1)\cdot(3n^2-3n+2n-2)}{24}\\ &=\frac{n(n+1)\cdot(3n+2)(n-1)}{24} \end{align*} Thus, your answer is correct and we can see a quick example:
Consider the following sum, for $n=4$: $$1\cdot 2 + 1\cdot 3+1\cdot 4 + 2\cdot 3 + 2\cdot 4 + 3\cdot 4 = 35$$ Then, we have: $$\frac{n(n+1)\cdot(3n+2)(n-1)}{24} = \frac{4\cdot 5\cdot 14\cdot 3}{24}=35$$ $$\frac{n(n+1)(2n-1)(n+3)}{24} = \frac{4\cdot 5\cdot 7\cdot 6}{24} = \frac{980}{24}\approx 40.8333$$ Note that when using the "given answer", an integer is not guaranteed, which is clearly incorrect.