Solve the following recurrence relation by generating its direct formula: $$a_n = 3a_{n-1} + 2n, a_0 = 1$$ Use the direct formula to find the $10th$ term of the recurrence relation.
My attempt:
$3(10-1) + 2(10)$
$3(9) + 20$
$27 + 20$
$10th$ term = $47$
Is this correct?
Divide by $3^n$ and define $u_n=a_n/3^n$. Solve the resulting equation for $u_n$ (this involves computing a sum) and retrieve $a_n$.