Help solving a recurrence relation I'm quite stuck on how to solve recurrence/difference equations.
For example I have the following linear inhomogeneous equation:
$a_n = 2a_{n-1} + 2^n n$, and $a_0 = 1/2$
I know that $2a_{n-1} = 1/2(2^n)$, and then we have $a_n = 1/2(2^n) + n(2^n)$. This is where I'm stuck though and the inhomogeneous part is throwing me off.
Am I in the right direction thinking that: $a_n = \frac12 \prod 2^n n$ ?
No answers please but some nudges in the right direction would be greatly appreciated. Thanks!

Hint:
Set $b_n = \frac{a_n}{2^n}$. Then dividing your recurrence by $2^n$ gives
$$b_n = b_{n-1} + n.$$
Do you see how to find a closed form for $b_n$? Do you see how to turn this into a closed form for $a_n$?
As a general "life pro tip", when you see a recurrence with a geometric term (i.e. something that looks like $r^n$) that's otherwise linear, you should try dividing by it. Since $r^{n+1} = r \cdot r^n$, this procedure turns your geometric term into a constant one, which is easier to handle.

I hope this helps ^_^
