Solve $p_{n+1} + \frac 16 p_n = \frac 1 2 (\frac 5 6 ) ^{n-1}$ I'm trying to solve:
 $$p_{n+1} + \frac 16 p_n = \frac 1 2 \left(\frac 5 6 \right) ^{n-1}$$
with initial condition: $p_1 = 1$.
First, I search particular solution of the form $p_n^* = \lambda (\frac 5 6 ) ^n$. I found $\lambda = \frac 3 5$.
Next, I know that $p_n = \alpha (-\frac 1 6)^n + \frac 3 5 (\frac 5 6 )^n$, and using $p_1 = 1$, I found: $\alpha = -3$.
Which leads to: $p_n = -3(-\frac 1 6)^n + \frac 3 5 (\frac 5 6 )^n$.
Well... But thanks to the recurrence formula, I have $p_2 = \frac 1 4$ and with this new formula, I have $p_2 = \frac 1 3$.
Where is my mistake?
 A: Your answer is correct! Here's a full solution to the recurrence.
We have the following:
$$
\begin{align*}
p_{n+1} + \dfrac{1}{6} p_n &= \dfrac{1}{2}\left(\dfrac{5}{6}\right)^{n-1} \\
p_{n} + \dfrac{1}{6} p_{n-1} &= \dfrac{1}{2}\left(\dfrac{5}{6}\right)^{n-2} \\
\end{align*}
$$
Dividing the two, we have:
$$
\begin{align*}
\dfrac{6p_{n+1} +  p_n}{6p_{n} + p_{n-1}} &= \dfrac{5}{6} \\
36p_{n+1} + 6p_n &= 30p_n + 5p_{n-1} \\
36p_{n+1} - 24p_n - 5p_{n-1} &= 0
\end{align*}
$$
The roots of the characteristic polynomial are $-\dfrac{1}{6}$ and $\dfrac{5}{6}$. Thus, the solution is in the form 
$$
p_n = \alpha \left(-\dfrac{1}{6}\right)^n + \beta \left(\dfrac{5}{6}\right)^n
$$
Plugging in $p_{1} = 1$ and $p_2 = \dfrac{1}{3}$, we find that $\alpha = -3$, $\beta = \dfrac{3}{5}$. 
Thus, the solution is 
$$
p_n = -3 \cdot \left(-\dfrac{1}{6}\right)^n + \dfrac{3}{5} \cdot \left(\dfrac{5}{6}\right)^n
$$
A: An alternate method of finding the solution of the difference equation is through generating functions. The following illustrates this method.
For the difference equation
\begin{align}
p_{n+1} + \frac{1}{6} \, p_n = \frac{1}{2} \, \left(\frac{5}{6} \right) ^{n-1}
\end{align}
it is seen that 
\begin{align}
\sum_{n=0}^{\infty} p_{n+1} \, t^{n} + \frac{1}{6} \, \sum_{n=0}^{\infty} p_{n} \, t^{n} &= \frac{1}{2} \sum_{n=0}^{\infty} \left(\frac{5}{6} \right) ^{n-1} \, t^{n} \\
\sum_{n=1}^{\infty} p_{n} \, t^{n-1} + \frac{1}{6} \, P(t) &= \frac{3}{5} \, \frac{1}{1 - \frac{5 t}{6}} \\
\frac{1}{t} \left( - p_{0} + P(t) \right) + \frac{P(t)}{6} &= \frac{18}{5} \, \frac{1}{6 - 5 t} \\
- 6 p_{0} + (t+6) P(t) &= \frac{108 t}{5(6- 5t)} 
\end{align}
or
$$P(t) = \frac{3}{5} \frac{1}{1- \frac{5t}{6}} + \frac{p_{0} - 3}{1 + \frac{t}{6}}$$
where $P(t) = \sum_{n=0}^{\infty} p_{n} t^{n}$. From this the result becomes
\begin{align}
p_{n} = \frac{1}{2} \, \left(\frac{5}{6}\right)^{n-1} + \frac{(-1)^{n}(p_{0} - 3)}{6^{n}}.
\end{align}
Since $p_{1} = 1$ then $p_{0} = 0$ and 
\begin{align}
p_{n} = \frac{3}{6^{n}} \, \left(5^{n-1} - (-1)^{n} \right).
\end{align}
