Alternating permutation


In combinatorial mathematics, an alternating permutation of the set is a permutation of those numbers so that each entry is alternately greater or less than the preceding entry. For example, the five alternating permutations of are:
  • 1, 3, 2, 4 because 1 < 3 > 2 < 4,
  • 1, 4, 2, 3 because 1 < 4 > 2 < 3,
  • 2, 3, 1, 4 because 2 < 3 > 1 < 4,
  • 2, 4, 1, 3 because 2 < 4 > 1 < 3, and
  • 3, 4, 1, 2 because 3 < 4 > 1 < 2.
This type of permutation was first studied by Désiré André in the 19th century.
Different authors use the term alternating permutation slightly differently: some require that the second entry in an alternating permutation should be larger than the first, others require that the alternation should be reversed, while others call both types by the name alternating permutation.
The determination of the number An of alternating permutations of the set is called André's problem. The numbers An are known as Euler numbers, zigzag numbers, or up/down numbers. When n is even the number An is known as a secant number, while if n is odd it is known as a tangent number. These latter names come from the study of the generating function for the sequence.

Definitions

A permutation is said to be alternating if its entries alternately rise and descend. Thus, each entry other than the first and the last should be either larger or smaller than both of its neighbors. Some authors use the term alternating to refer only to the "up-down" permutations for which, calling the "down-up" permutations that satisfy by the name reverse alternating. Other authors reverse this convention, or use the word "alternating" to refer to both up-down and down-up permutations.
There is a simple one-to-one correspondence between the down-up and up-down permutations: replacing each entry with reverses the relative order of the entries.
By convention, in any naming scheme the unique permutations of length 0 and 1 are taken to be alternating.

André's theorem

The determination of the number An of alternating permutations of the set is called André's problem. The numbers An are variously known as Euler numbers, zigzag numbers, up/down numbers, or by some combinations of these names. The name Euler numbers in particular is sometimes used for a closely related sequence. The first few values of An are 1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521,....
These numbers satisfy a simple recurrence, similar to that of the Catalan numbers: by splitting the set of alternating permutations of the set according to the position k of the largest entry, one can show that
for all. used this recurrence to give a differential equation satisfied by the exponential generating function
for the sequence. In fact, the recurrence gives:
where we substitute and. This gives the integral equation
which after differentiation becomes.
This differential equation can be solved by separation of variables, and simplified using a tangent half-angle formula, giving the final result
the sum of the secant and tangent functions. This result is known as André's theorem. A geometric interpretation of this result can be given using a generalization of a theorem by Johann Bernoulli
It follows from André's theorem that the radius of convergence of the series is /2. This allows one to compute the asymptotic expansion

Seidel's Algorithm

In 1877 Philipp Ludwig von Seidel published an algorithm, which makes it simple to calculate.
  1. Start by putting 1 in row 0 and let denote the number of the row currently being filled
  2. If is odd, then put the number on the left end of the row in the first position of the row, and fill the row from the left to the right, with every entry being the sum of the number to the left and the number to the upper
  3. At the end of the row duplicate the last number.
  4. If is even, proceed similar in the other direction.
Seidel's algorithm is in fact much more general and was rediscovered several times thereafter.
Similar to Seidel's approach D. E. Knuth and T. J. Buckholtz gave a recurrence equation for the numbers and recommended this method for computing the Bernoulli numbers and Euler numbers 'on electronic computers using only simple operations on integers'.
V. I. Arnold rediscovered Seidel's algorithm and later Millar, Sloane and Young popularized Seidel's algorithm under the name boustrophedon transform.
Triangular form:
Only, with one 1, and, with two 1s, are in the OEIS.
Distribution with a supplementary 1 and one 0 in the following rows:
This is, a signed version of. The main andiagonal is. The main diagonal is. The central column is. Row sums: 1, 1, −2, −5, 16, 61.... See. See the array beginning with 1, 1, 0, −2, 0, 16, 0 below.
The Akiyama–Tanigawa algorithm applied to / yields:
1. The first column is. Its binomial transform leads to:
The first row of this array is. The absolute values of the increasing antidiagonals are. The sum of the antidiagonals is
2. The second column is. Its binomial transform yields:
The first row of this array is. The absolute values of the second bisection are the double of the absolute values of the first bisection.
Consider the Akiyama-Tanigawa algorithm applied to / = abs) + 1 =.
The first column whose the absolute values are could be the numerator of a trigonometric function.
is an autosequence of the first kind. The corresponding array is:
The first two upper diagonals are = × . The sum of the antidiagonals is = 2 × .
− is an autosequence of the second kind, like for instance /. Hence the array:
The main diagonal, here, is the double of the first upper one, here. The sum of the antidiagonals is = 2 × . − = 2 × .

Related sequences

The odd-indexed zigzag numbers are closely related to Bernoulli numbers. The relation is given by the formula
for n > 0.
If Zn denotes the number of permutations of that are either up-down or down-up then it follows from the pairing given above that Zn = 2An for n ≥ 2. The first few values of Zn are 1, 1, 2, 4, 10, 32, 122, 544, 2770, 15872, 101042,....

The Euler zigzag numbers are related to Entringer numbers, from which the zigzag numbers may be computed. The Entringer numbers can be defined recursively as follows:
The nth zigzag number is equal to the Entringer number E.
The numbers A2n with even indices are called secant numbers or zig numbers: since the secant function is even and tangent is odd, it follows from André's theorem above that they are the numerators in the Maclaurin series of. The first few values are 1, 1, 5, 61, 1385, 50521,... .
Secant numbers are related to the signed Euler numbers by the formula E2n = nA2n.
Correspondingly, the numbers A2n+1 with odd indices are called tangent numbers or zag numbers. The first few values are 1, 2, 16, 272, 7936,... .

Explicit formula in terms of Stirling numbers of the second kind

The relationships of Euler zigzag numbers with the Euler numbers, and the Bernoulli numbers can be used to prove the following
where
denotes the rising factorial, and denotes Stirling numbers of the second kind.