I am currently following some slides I found to try and learn how to find the average case complexity for some algorithms. I got stuck when having to handle this summation though:
$$\sum_{i=1}^k i*2^i $$
According to the slides: it can be shown that the the summation is equal to:
$$(k - 1)·({2^k+1}) + 2 $$
Can somebody explain how to get to this answer?