<s>[INST] How to compute the  formula $\sum  \limits_{r=1}^d r \cdot 2^r$? Given $$1\cdot 2^1 + 2\cdot 2^2 + 3\cdot 2^3 + 4\cdot 2^4 + \cdots + d \cdot 2^d = \sum_{r=1}^d r \cdot 2^r,$$
how can we infer to the following solution? $$2 (d-1) \cdot 2^d + 2. $$
Thank you
 [/INST] Perhaps a sixth way...
$$\displaystyle S = \sum_{r=1}^{d} r\cdot 2^r$$
$$\displaystyle 2S = \sum_{r=1}^{d} r\cdot 2^{r+1} = \sum_{r=2}^{d+1} (r-1)2^{r}$$
$$\displaystyle 2S -S = d\cdot 2^{d+1} - \sum_{r=1}^{d} 2^r = d\cdot 2^{d+1} - 2^{d+1} +2  = (d-1)2^{d+1} + 2$$
</s>