1*n+2(n-1)+3(n-2)+……+(n-2)*3+(n-1)*2+n*1
=1*(n+1-1)+2(n+1-2)+3(n+1-3)+……+(n-2)*(n+1-(n-2))+(n-1)*(n+1-n-1)+n*(n+1-n)
=(1+2+3+...+n)(n+1)-(1^2+2^2+3^2+.+n^2)
=n(n+1)^2/2-n(n+1)(2n+1)/6
=n*(n+1)*(n+2)/6
1*n+2(n-1)+3(n-2)+……+(n-2)*3+(n-1)*2+n*1
=1*(n+1-1)+2(n+1-2)+3(n+1-3)+……+(n-2)*(n+1-(n-2))+(n-1)*(n+1-n-1)+n*(n+1-n)
=(1+2+3+...+n)(n+1)-(1^2+2^2+3^2+.+n^2)
=n(n+1)^2/2-n(n+1)(2n+1)/6
=n*(n+1)*(n+2)/6