Question:

> 
> Solve the recurrence relation
> 
> 
> $\ a\_n = 3a\_{n-1} - 2a\_{n-2} + 1 $, for all $\ n \ge 2$
> 
> 
> $\ a\_0 = 2 $
> 
> 
> $\ a\_1 = 3 $
> 
> 
> Write $\ a\_n $ in terms of n
> 
> 
> 

I tried to solve this by finding the characteristic equation, $\ r^2 - 3r + 2 - 1 = 0 $ which is $\ r^2 - 3r + 1 $. However, I can't simplify that further because of the "+ 1" unless I use the quadratic general formula... but the roots will be in fractions and they are definitely not correct compared to the answers..

So I tried to find $\ a\_2, a\_3, a\_4 $ and so on... like this:

$\ a\_2 = 3a\_1 - 2a\_0 + 1 = 3(3) - 2(2) + 1 = 6 $

$\ a\_3 = 3a\_2 - 2a\_1 + 1 = 3(6) - 2(3) + 1 = 13 $

$\ a\_4 = 3a\_3 - 2a\_2 + 1 = 3(13) - 2(6) + 1 = 28 $

*and so on...*

But it leads me to nowhere as I couldn't find any common pattern between $\ a\_2, a\_3, a\_4 $ and so on, to derive $\ a\_n $...

How do I solve recurrence relations like this?