The sum of the product of the integers 1,2,3,...., n taken two at a time is
n(n+1)24(3n2−n−2)
(a+b)2=(a2+b2)+2(ab)=∑a2+2∑ab(a+b+c)2=(a2+b2+c2)+2(ab+bc+cd)=∑a2+2∑abIn general,(a1+a2+⋯+an)2=(a21+a22+⋯+a2n)+2(a1a2+a1a3+⋯+an−1an)=∑a21+2∑a1a2∴(1+2+3+⋯+n)2=(12+22+32+⋯+n2)+2(sum of products of n integers taken two at a time)
i.e. (∑n)2=∑n2+2S; where S is the required sum
∴S=12[(∑n)2−(∑n2)]=12[{n(n+1)2}2−{n(n+1)(2n+1)6}]=n(n+1)24(3n2−n−2)