Let $P(n) = 2P(n-1) + n, P(1) = 3.$ Use induction to show that $$P(n) = 3(2^n) - n - 2$$
Highly verbose solutions are greatly appreciated.
Let $P(n) = 2P(n-1) + n, P(1) = 3.$ Use induction to show that $$P(n) = 3(2^n) - n - 2$$
Highly verbose solutions are greatly appreciated.
The formation of the question suggests that a general solution is of the type: $$P(n) = k\cdot2^n + an + b$$ with integers $a, b , k$. So $P(1) = 3 \implies 3 = 2k + a + b$ (1). Let $n = 2$ in the equation, $P(2) = 2\cdot3 + 2 = 8 = 4k + 2a + b$ (2), and let $n = 3$ gives: $P(3) = 2\cdot8 + 3 = 19 = 8k + 3a + b$ (3).
Solving the system (1), (2), and (3) gives: $b = -2, a = -1, k = 3$. So $P(n) = 3\cdot2^n - n - 2$.
Here's what I found after consulting some other people with this issue, and some additional study materials:
Let $p(n) = 3(2^n)-n-2$ for $n>=1$, then $p(1) = 3$, so $p(1)$ is true.
Suppose $k>1$ is an integer and $p(k-1)$ is true. So $p(k-1) = 3(2^{k-1})-(k-1)-2$
By the given relation:
$p(k) = 2(3(2^{k-1})-(k-1)-2)+k$
Simplify:
$p(k) = 3(2^k)-k-2$
So it is true that $p(n) = 3(2^n)-n-2$ for $n>=1$