n
∑ i*(n-i+1)=1*n+2*(n-1)+3*(n-2)+...+n*1=n * (n+1)*(n+2)/6
i=1
n
∑ i*i*(n-i+1)=1*1*n+2*2*(n-1)+3*3*(n-2)+...+n*1=n*(n+1)*(n+1)*(n+2)/12
i=1
n
∑ i*(n-i+1)=1*n+2*(n-1)+3*(n-2)+...+n*1=n * (n+1)*(n+2)/6
i=1
n
∑ i*i*(n-i+1)=1*1*n+2*2*(n-1)+3*3*(n-2)+...+n*1=n*(n+1)*(n+1)*(n+2)/12
i=1