# How to solve the following recurrence relations?

I encounter the following recurrence relations when trying to find a general formula for the derivative of $$f(x) = (1 + e^x)^{-1}$$ ,

for $$n\geq 0$$,

\begin{align*} a(0,1) &= 1,\\ a(n,0) &= 0, \quad \\ a(n+1,k) &= (k - 1)a(n, k - 1) - a(n,k),\quad 1 \leq k \leq n+1, \\ a(n + 1,n+2) &= (n+1)a(n,n+1), \end{align*} For $$n \geq 0$$, according to that post, the solution seems to be $$a(n,k) = (-1)^n \sum_{j = 0}^{k - 1}(-1)^j\binom{k - 1}{j}(j+1)^n,\quad 0 \leq k \leq n+1$$ but I don't know how to get there. I never encounter recurrence relation of this form before.

So here are my questions.

1. Is there any method to solve this type of recurrence? If any, would you mind to tell me the book/reference on this topic might be.
2. I'm not sure about this, but is the solution to the problem unique? I think it is, by tring to apply the relations.

Most importantly, how to find the solution above? Any help would be appreciated.

• That recurrence reminds me of the ones for Stirling numbers. Commented Oct 31, 2019 at 12:32

$$A(x, y) =\sum_{i=0}^{\infty}\sum_{j=0}^{\infty} a(i,j)x^iy^j$$
• I have tried this, but (if I'm not mistaken) give me (one of them) the following infinite sum $$\sum_{n = 0}^\infty (n + 1)a(n,n + 1)x^{n + 1} y^{n + 2} = \sum_{n = 0}^\infty n! x^{n + 1} y^{n + 2}$$ which diverges for all $x,y\neq 0$. Commented Oct 31, 2019 at 12:35
• Maybe try $A(x, y) =\sum_{i=0}^{\infty}\sum_{j=0}^{\infty} \dfrac{a(i,j)x^iy^j}{i!j!}$. Commented Aug 1, 2023 at 20:03