Let's consider an arithmetico-geometric sequence $u_{n+1}=a u_{n}+b$

1. Let's take another sequence $\left(v_{n}\right)$ that satisfies the same recurrence relation as $\left(u_{n}\right)$ (i.e., $\left.v_{n+1}=a \cdot v_{n}+b\right)$. What can we say about the sequence $\left(w_{n}\right)=\left(u_{n}-v_{n}\right)$?
2. By finding a simple sequence $\left(v_{n}\right)$ that satisfies the above, deduce a formula for $\left(u_{n}\right)$.

A natural generalization are recurrence sequences of order $k$ (with a second term), but here we will only deal with those of order 2 (without a second term) and only in the case of distinct roots for the characteristic polynomial (see below, and it will be clearer).
1. Notice that

$$
w_{n+1}=u_{n+1}-v_{n+1}=a u_{n}+b-a v_{n}-v=a\left(u_{n}-v_{n}\right)=a w_{n}
$$

and thus $\left(w_{n}\right)$ is a geometric sequence with ratio $a$

2. A particularly easy sequence to handle is a constant sequence, so let's look for such a sequence $\left(v_{n}\right)$ that is constant, say equal to $c$, while satisfying the recurrence relation.

It is necessary and sufficient to have:

$$
c=a c+b \text { i.e. } c=\frac{b}{1-a}
$$

Thus, from the previous question, we deduce that $w_{n}=u_{n}-v_{n}=u_{n}-c$ is geometric with ratio $a$ i.e. $w_{n}=a^{n} w_{0}=a^{n}\left(u_{0}-c\right)$

The formula finally becomes:

$$
u_{n}=w_{n}+c=a^{n}\left(u_{0}-c\right)+c \text { with } c=\frac{b}{1-a}
$$

For the previous exercise, taking the first term as $u_{1}$ instead of $u_{0}$, we get

$$
u_{n}=a^{n-1}\left(u_{1}-c\right)+c \text { with } c=\frac{b}{1-a}
$$

This gives us

$$
u_{n}=2^{n-1}\left(1-\frac{1}{1-2}\right)+\frac{1}{1-2}=2^{n-1}(1+1)-1=2^{n}-1
$$