I was solving a coding problem which boiled down to computing this formula
$A_n = \sum\limits_{i=1}^n 2^i \cdot ((n + 1) - i)$ where $1 < n < 10^9$
Since $n$ is a huge number the linear time solution exceeds the time limit specified.
I am not sure if this can be further simplified into something that doesn't require looping through the entire $n$ intermediate sums and summing them up.
Could you please tell me if this can be further simplified and how.