Entringer number
The Entringer number (OEIS A008281) E(n,k) is the number of permutations of the n+1 numbers from 0 to n satisfying the following conditions:
- The first element is k.
- The next element is smaller than the first, the following element is larger than the preceding one, the next is smaller than the preceding one, and so on; every subsequent adjacent pair follows this alternating pattern.
The initial values of the Entringer numbers include:
E(0,0)=1
E(n,0)=0
They satisfy the recurrence
E(n,k)=E(n,k−1)+E(n−1,n−k)
Seidel–Entringer–Arnold triangle
A suitably arranged number triangle of Entringer numbers is called the Seidel–Entringer–Arnold triangle (OEIS A008280). It arranges the Entringer numbers E(n,k) in ox-plowing order:
E(0,0)E(1,0)→E(1,1)E(2,2)←E(2,1)←E(2,0)E(3,0)→E(3,1)→E(3,2)→E(3,3)E(4,4)←E(4,3)←E(4,2)←E(4,1)←E(4,0)
That is:
10→11←1←00→1→2→25←5←4←2←0
The advantage of this arrangement is that it agrees with the recurrence E(n,k)=E(n,k−1)+E(n−1,n−k), making the recurrence easier to remember and understand.
The Entringer numbers have an exponential generating function:
m=0∑∞n=0∑∞E(m+n,21(m+n+(−1)m+n(n−m)))m!xmn!xn=cos(x+y)cosx+sinx
The coefficient arrangement of this generating function is in fact a simple stretched version of the Seidel–Entringer–Arnold triangle above:
E(0,0)E(1,0)E(2,2)E(3,0)E(4,4)E(1,1)E(2,1)E(3,1)E(4,3)E(2,0)E(3,2)E(4,2)E(3,3)E(4,1)E(4,0)
That is:
110200122114055
Zigzag permutations
A zigzag permutation is a permutation c1 through ci of 1 through n such that no element ci lies between ci−1 and ci+1 in value.
The number of zigzag permutations Zn (OEIS A001250), starting from n=0, is:
1,1,2,4,10,32,122,544,⋯
For example, the alternating permutations for the first few values of n are:
n=1:n=2:n=3:n=4:{1}{1,2},{2,1}{1,3,2},{2,1,3},{2,3,1},{3,1,2}{1,3,2,4},{1,4,2,3},{2,1,4,3},{2,3,1,4},{2,4,1,3},{3,1,4,2},{3,2,4,1},{3,4,1,2},{4,1,3,2},{4,2,3,1}
Alternating permutations and zigzag numbers
(These should be distinguished conceptually from derangements.)
For n greater than 1, reversing every zigzag permutation produces another zigzag permutation, so the permutations can be paired and their number must be even.
Here is another pairing method: divide zigzag permutations into alternating permutations and reverse alternating permutations.
An alternating permutation starts with a larger element and satisfies
c1>c2<c3>⋯
A reverse alternating permutation starts with a smaller element and satisfies
c1<c2>c3<⋯
Swapping positions 1 and n, positions 2 and n−1, and so on exchanges the two sets. Therefore, the numbers of alternating and reverse alternating permutations are equal, exactly half the number of zigzag permutations.
For n greater than 1, let:
An=2Zn
with initial values
A0=A1=1
Here An is called the Euler zigzag number (OEIS A000111), with values starting from n=0:
1,1,1,2,5,16,61,272,⋯
Let us derive An.
Choose a k-element subset from 1 through n; there are (kn) choices.
Within this k-element subset, choose a reverse alternating permutation u; there are Ak choices. From the remaining k-element subset of n−k elements, choose a reverse alternating permutation v; there are An−k choices.
Consider a permutation w of n+1 elements. Reverse u to form its beginning, append n+1, and then append v. Thus, w is certainly a zigzag permutation. Conversely, every zigzag permutation of n+1 elements can be cut at n+1 to obtain the corresponding reverse alternating permutations u and v, and distinct n+1-element zigzag permutations give distinct u and v.
Therefore,
2An+1=k=0∑n(kn)AkAn−k
2(n+1)(n+1)!An+1=k=0∑nk!Ak(n−k)!An−k
When n is 0, this recurrence does not hold; the initial values A0 and A1 are both 1.
This is a convolution of exponential generating functions. If the exponential generating function of An is y, then:
2dxdy=y2+1
The 1 on the right handles the special case when n is 0. The general solution is:
y=tan(21x+C)
Substituting the term for 0, which is 1, gives the particular solution:
y=tanx+secx
The tangent function is odd and the secant function is even, so their sum is the generating function of the zigzag numbers.
Relationship between Entringer numbers and zigzag numbers
By definition, the Entringer number E(n,k) counts alternating permutations of 0 through n whose first element is k. Thus, Entringer numbers and zigzag numbers are related by:
An=E(n,n)
There is also a reason for calling An the zigzag number. Let En be the Euler number and Bn the Bernoulli number.
When n is even, the zigzag numbers with even indices are also called secant numbers Sn, or zig numbers. They satisfy:
An=(−1)n/2En
The first few values (OEIS A000364) are:
1,1,5,61,1385,⋯
When n is odd, the zigzag numbers with odd indices are also called tangent numbers Tn, or zag numbers. They satisfy:
An=n+1(−1)(n−1)/22n+1(2n+1−1)Bn+1
The first few values (OEIS A000182) are:
1,2,16,272,7936,⋯
Thus, the Taylor expansions at x=0 give the secant and tangent numbers:
secx=A0+A22!x2+A44!x4+⋯
tanx=A1x+A33!x3+A55!x5+⋯
Or, combined:
secx+tanx=A0+A1x+A22!x2+A33!x3+A44!x4+A55!x5+⋯
which is the generating function of the zigzag numbers.
References and links
- Alternating permutation - Wikipedia