Solving partial difference equation

I am trying to solve the following partial difference equation:

$$A_k^{n+1}=(k+1)A_{k+1}^n+(n+2-k)A_{k-1}^n$$

with initial condition:

$$\begin{cases} A_0^0&=1\\ A_1^0&=1 \end{cases}$$

I have tried using generating function method and the detail is given by the following article in Voofie:

Reducing a partial difference equation into a partial differential equation and solving for the generating function using method of characteristics

The generating function I found is:

$$A(x,y)=\left(\sec \left(y\sqrt{1-x^2}+\sin ^{-1}x\right)+\tan \left(y\sqrt{1-x^2}+\sin ^{-1}x\right)\right)\sqrt{1-x^2}$$

if A(x,y) is defined by:

$$A(x,y)=\sum _{n=0}^{\infty } \sum _{k=0}^{\infty } \frac{A_k^n x^k y^n}{n!}$$

Though I have solved the generating function, I still can't solve explicitly the form of $A_k^n$.

Can anyone help me with it? And is there any other approach other than the generating function method?

P.S. If you would like to know where the partial difference equation comes from, please refer to this article:

Finding nth derivative of the function sec x + tan x and partial difference equation

• Ross, it's another portion of your zigzags. Jul 27 '10 at 12:18
• You are right, Zudilin. Are you interested in finding a close form solution? Btw, the zigzags are just the tangent and secant number. Therefore that's not really mine. Jul 27 '10 at 13:57

As I'm sure you've noticed, the two recurrences with $n \equiv k \mod 2$ and $n \equiv k+1 \mod 2$ don't interact with each other, so you have two triangular arrays of numbers here.
When $n \equiv k \mod 2$, you are looking at A008971. When $n \equiv k+1 \mod 2$, I don't think this sequence has been seen before.
• Thank you for your answer. I read the page you mentioned in wikipedia. There is indeed closed form to Eulerian numbers: $A(n,m)=\sum_{k=0}^{m}(-1)^k \binom{n+1}{k} (m+1-k)^n.$ I don't know if I read it wrongly or not. Thanks! Jul 27 '10 at 13:47
• But David's comment implies that you can decouple your recurrence relation into two separate ones: One for the $n \equiv k \bmod{2}$ case and one for the $n \equiv k+1 \bmod{2}$ case. If you do that, rearranging indices and plowing through some algebra, the first case turns into the recurrence $B^n_k = (2k-n+1)B^{n-1}_k + (2n-2k+1)B^{n-1}_{k-1}$, $B^0_0 = 1$, and the second case turns into the recurrence $C^n_k = (2k-n+2)C^{n-1}_k + (2n-2k)C^{n-1}_{k-1}$, $C^0_0 = 1$. Maybe these aren't much better, but they are at least "first order" in both $n$ and $k$ now. Oct 4 '10 at 4:22