<s>[INST] 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?
 [/INST] 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}
</s>