sum of 2^(n-i) * i, i = 1 to n