# Explicit formula for Euler zigzag numbers(Up/down numbers)

1. Jul 26, 2010

### ross_tang

I have derived an explicit formula for the http://mathworld.wolfram.com/EulerZigzagNumber.html" [Broken], the number of alternating permutations for n elements:
$$A_j=i^{j+1}\sum _{n=1}^{j+1} \sum _{k=0}^n \frac{C_k^n(n-2k)^{j+1}(-1)^k}{2^ni^nn}$$

For details, please refer to my article in http://www.voofie.com" [Broken]:

http://www.voofie.com/content/117/an-explicit-formula-for-the-euler-zigzag-numbers-updown-numbers-from-power-series/" [Broken]

I would like to ask, if my formula is new, or is it a well known result? Since I can't find it in Wikipedia or MathWorld. If it is an old formula, can anyone give me some reference to it?

Last edited by a moderator: May 4, 2017
2. Jul 26, 2010

### arildno

3. Jul 26, 2010

### CRGreathouse

There are many formulas at Sloane's http://www.research.att.com/~njas/sequences/A000111 [Broken] though I don't see yours, at least directly. But it may be there in disguised form.

Computationally, your formula is not competitive with some of the others listed there. For example, given

Code (Text):
a(n)=local(v=[1], t); if(n<0, 0, for(k=2, n+2, t=0; v=vector(k, i, if(i>1, t+=v[k+1-i])));v[2])
A(j)=I^(j+1)*sum(n=1,j+1,sum(k=0,n,binomial(n,k)*(n-2*k)^(j+1)*(-1)^k/2^n/I^n/n))
your code A(500) takes four times longer than Somos' code a(500). I don't know if yet more efficient code exists.

Last edited by a moderator: May 4, 2017
4. Jul 26, 2010

### ross_tang

@arildno
Thank you for the link. I haven't read the "Entringer numbers" before. But I don't found explicit formula, and seems the Euler zigzag number is it's special case.

@CRGreathouse
I have read the link you send me before. Thank you. First, I found out the formula, not because it is computationally efficient. I am interested in the explicit form of it. Since the zigzag number sequence is solution to a few number of recurrence relation. And the Somo's code you mentioned used recurrence relation too. But I found none explicit form in the link.