Closed form of recurrence relation $a_k=(n+k)a_{k-1}-ka_{k-2}$

closed-formgenerating-functionsordinary differential equationsrecurrence-relations

The goal is to derive a closed form expression of $(a_k)_{k\ge1}$ such that $$a_k=(n+k)a_{k-1}-ka_{k-2}$$ for all positive integers $n$, given the values of $a_0$ and $a_{-1}$.

Considering the generating function $A(x)=\sum\limits_{k\ge0}a_kx^k$, we have \begin{align}A(x)&=a_0+a_1x+n\sum_{k\ge2}a_{k-1}x^k+\sum_{k\ge2}k(a_{k-1}-a_{k-2})x^k\\&=a_0+a_1x+nx(A(x)-a_0)+x\frac d{dx}\sum_{k\ge2}(a_{k-1}-a_{k-2})x^k\\&=a_0+a_1x-na_0x+nxA(x)+x\frac d{dx}(x(A(x)-a_0)-x^2A(x))\\&=a_0+a_1x-na_0x+nxA(x)+x[A(x)-a_0+xA'(x)-2xA(x)-x^2A'(x)]\end{align} which gives the first-order linear ODE $$x^2(x-1)A'(x)+(2x^2-(n+1)x+1)A(x)=a_0+(a_1-(n+1)a_0)x,$$ but this does not provide a closed form of $A(x)$ for all positive $n$.

Are there any other approaches that can be used to solve this recurrence relation?

Best Answer

Edit: Made a mistake in the resulting differential equation, so the problem is no longer so neat.

We consider the exponential generating function as Somos suggests to get

\begin{align}f(x)&=\sum_{n=0}^\infty\frac{a_k}{k!}x^k\\&=a_0+a_1x+\sum_{k=0}^\infty\frac{(n+k+2)a_{k+1}-(k+2)a_k}{(k+2)!}x^{k+2}\\&=a_0+[a_1-(n+1)a_0]x+\sum_{k=0}^\infty\frac{(n+k+1)a_k}{(k+1)!}x^{k+1}-\sum_{k=0}^\infty\frac{a_k}{(k+1)!}x^{k+2}\\&=a_0+[a_1-(n+1)a_0]x+xf(x)+\sum_{k=0}^\infty\frac{na_k}{(k+1)!}x^{k+1}-x\sum_{k=0}^\infty\frac{a_k}{(k+1)!}x^{k+1}\\y'&=a_0+[a_1-(n+1)a_0]x+xy'+(n-x)y\\0&=a_0+[a_1-(n+1)a_0]x+(n-x)y+(x-1)y'\end{align}

where we set $\displaystyle y=\sum_{k=0}^\infty\frac{a_k}{(k+1)!}x^{k+1}$ so that $y'=f(x)$.

Related Question