TITLE: Solving the recursion $3a_{n+1}=2(n+1)a_n+5(n+1)!$ via generating functions
QUESTION [19 upvotes]: I have been trying to solve the recurrence: 
\begin{align*}
a_{n+1}=\frac{2(n+1)a_n+5((n+1)!)}{3},
\end{align*}
where $a_0=5$, via generating functions with little success. My progress until now is this:
Let $A(x)=\sum_{n=0} ^{\infty} a_nx^n$. By multiplying both sides of our recurrence relation by $x^n$ and summing over $n$ from $0$ to $\infty$, we see that 
\begin{align}
\sum_{n=0} ^{\infty} a_{n+1} x^n = \frac{2}{3}\sum_{n=0} ^{\infty} (n+1)a_nx^n + \sum_{n=0} ^{\infty} (n+1)!x^n.
\end{align}
Using our definition of $A(x)$ we can rewrite the left hand side as
\begin{align*}
\sum_{n=0} ^{\infty} a_{n+1} x^n=\frac{A(x)-a_0}{x}.
\end{align*}
Such manipulations of the right hand side have been difficult because of the coefficients of the power series. 
Is there anyway to proceed from here, or are generating functions not suited to solve such a recurrence?

REPLY [3 votes]: A first order linear non-homogeneous recurrence:
$$
a_{n + 1} - c_n a_n = f_n
$$
can be reduced to a telescoping sum by dividing by the summing factor $s_n = \prod_{0 \le k \le n} c_n$:
$$
\begin{align*}
\frac{a_{n + 1}}{s_n} - \frac{a_n}{s_{n - 1}}
   &= \frac{f_n}{s_n} \\
\sum_{0 \le n \le m - 1} \frac{a_{n + 1}}{s_n} - \frac{a_n}{s_{n - 1}}
   &= \sum_{0 \le n \le m - 1} \frac{f_n}{s_n} \\
\frac{a_m}{s_{m - 1}} - \frac{a_0}{1}
   &= \sum_{0 \le n \le m - 1} \frac{f_n}{s_n}
\end{align*}
$$
It is easier to go through this dance each time. Here the summing factor is:
$$
\prod_{0 \le k \le n} \frac{2}{3}(n + 1) = \left( \frac {2}{3} \right)^{n + 1} (n + 1)!
$$
Dividing through by this gives:
$$
\begin{align*}
\frac{a_{n + 1}}{(2 / 3)^{n + 1} (n + 1)!} - \frac{a_n}{(2/3)^n n!}
  &= \frac{5}{3 (2 / 3)^{n + 1}} \\
\frac{a_n}{(2/3)^n n!} - \frac{a_0}{1}
  &= \frac{5}{3} \sum_{0 \le k \le n - 1} (3/2)^{k + 1} \\
\frac{a_n}{(2/3)^n n!}
  &= 5 + \frac{5}{3} \cdot \frac{3}{2} \cdot \frac{(3/2)^n - 1}{3/2 - 1} \\
  &= 5 + 5 \left( (3/2)^n - 1 \right) \\
a_n
  &= 5 n!
\end{align*}
$$