Sn=1+2x3+3x7+...+n(2^n-1)
=(1x2-1)+(2x2^2-2)+(3x2^3-3).+(nx2^n-n)
=[1x2+2x2^2+3x2^3+.+nx2^n]-[1+2+3...+n]
=2nx2^n -2x2^n+2 -n(n+1)/2
Sn=1+2x3+3x7+...+n(2^n-1)
=(1x2-1)+(2x2^2-2)+(3x2^3-3).+(nx2^n-n)
=[1x2+2x2^2+3x2^3+.+nx2^n]-[1+2+3...+n]
=2nx2^n -2x2^n+2 -n(n+1)/2