In
combinatorial
Combinatorics is an area of mathematics primarily concerned with counting, both as a means and as an end to obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many ...
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, an alternating permutation (or zigzag permutation) of the set is a
permutation
In mathematics, a permutation of a set can mean one of two different things:
* an arrangement of its members in a sequence or linear order, or
* the act or process of changing the linear order of an ordered set.
An example of the first mean ...
(arrangement) 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 (as in the examples above), others require that the alternation should be reversed (so that the second entry is smaller than the first, then the third larger than the second, and so on), while others call both types by the name alternating permutation.
The determination of the number ''A''
''n'' of alternating permutations of the set is called André's problem. The numbers ''A''
''n'' are known as Euler numbers, zigzag numbers, or up/down numbers. When ''n'' is even the number ''A''
''n'' 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
In mathematics, a generating function is a representation of an infinite sequence of numbers as the coefficients of a formal power series. Generating functions are often expressed in closed form (rather than as a series), by some expression invo ...
for the sequence.
Definitions
A
permutation
In mathematics, a permutation of a set can mean one of two different things:
* an arrangement of its members in a sequence or linear order, or
* the act or process of changing the linear order of an ordered set.
An example of the first mean ...
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
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equivale ...
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 (the permutation of the
empty set
In mathematics, the empty set or void set is the unique Set (mathematics), set having no Element (mathematics), elements; its size or cardinality (count of elements in a set) is 0, zero. Some axiomatic set theories ensure that the empty set exi ...
) and 1 (the permutation consisting of a single entry 1) are taken to be alternating.
André's theorem

The determination of the number ''A''
''n'' of alternating permutations of the set is called ''André's problem''. The numbers ''A''
''n'' are variously known as ''Euler numbers'', ''zigzag numbers'', ''up/down numbers'', or by some combinations of these names. The name
Euler number
Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
s in particular is sometimes used for a closely related sequence. The first few values of ''A''
''n'' are 1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, ... .
These numbers satisfy a simple recurrence, similar to that of the
Catalan number
The Catalan numbers are a sequence of natural numbers that occur in various Enumeration, counting problems, often involving recursion, recursively defined objects. They are named after Eugène Charles Catalan, Eugène Catalan, though they were p ...
s: by splitting the set of alternating permutations (both down-up and up-down) 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
In mathematics, separation of variables (also known as the Fourier method) is any of several methods for solving ordinary differential equation, ordinary and partial differential equations, in which algebra allows one to rewrite an equation so tha ...
(using the
initial condition ), and simplified using a
tangent half-angle formula, giving the final result
:
,
the sum of the
secant and
tangent
In geometry, the tangent line (or simply tangent) to a plane curve at a given point is, intuitively, the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points o ...
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
In mathematics, the radius of convergence of a power series is the radius of the largest Disk (mathematics), disk at the Power series, center of the series in which the series Convergent series, converges. It is either a non-negative real number o ...
of the series is /2. This allows one to compute the
asymptotic expansion
In mathematics, an asymptotic expansion, asymptotic series or Poincaré expansion (after Henri Poincaré) is a formal series of functions which has the property that truncating the series after a finite number of terms provides an approximation ...
:
Related sequences
The odd-indexed zigzag numbers (i.e., the tangent numbers) are closely related to
Bernoulli numbers
In mathematics, the Bernoulli numbers are a sequence of rational numbers which occur frequently in analysis. The Bernoulli numbers appear in (and can be defined by) the Taylor series expansions of the tangent and hyperbolic tangent functions, ...
. The relation is given by the formula
:
for ''n'' > 0.
If ''Z''
''n'' denotes the number of permutations of that are either up-down or down-up (or both, for ''n'' < 2) then it follows from the pairing given above that ''Z''
''n'' = 2''A''
''n'' for ''n'' ≥ 2. The first few values of ''Z''
''n'' 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 ''n''
th zigzag number is equal to the Entringer number ''E''(''n'', ''n'').
The numbers ''A''
2''n'' 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
Maclaurin or MacLaurin is a surname. Notable people with the surname include:
* Colin Maclaurin (1698–1746), Scottish mathematician
* Normand MacLaurin (1835–1914), Australian politician and university administrator
* Henry Normand MacLaurin ...
of . The first few values are 1, 1, 5, 61, 1385, 50521, ... .
Secant numbers are related to the signed
Euler number
Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
s (Taylor coefficients of hyperbolic secant) by the formula ''E''
2''n'' = (−1)
''n''''A''
2''n''. (''E''
''n'' = 0 when ''n'' is odd.)
Correspondingly, the numbers ''A''
2''n''+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
Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
, and the
Bernoulli numbers
In mathematics, the Bernoulli numbers are a sequence of rational numbers which occur frequently in analysis. The Bernoulli numbers appear in (and can be defined by) the Taylor series expansions of the tangent and hyperbolic tangent functions, ...
can be used to prove the following
:
where
:
denotes the
rising factorial
In mathematics, the falling factorial (sometimes called the descending factorial, falling sequential product, or lower factorial) is defined as the polynomial
\begin
(x)_n = x^\underline &= \overbrace^ \\
&= \prod_^n(x-k+1) = \prod_^(x-k) .
\end ...
, and
denotes
Stirling numbers of the second kind.
See also
*
Longest alternating subsequence
*
Boustrophedon transform
*
Fence (mathematics)
In mathematics, a fence, also called a zigzag poset, is a partially ordered set (poset) in which the order relations form a path with alternating orientations:
:acehbdfi \cdots
A fence may be finite, or it may be formed by an infinite alternatin ...
, a
partially ordered set
In mathematics, especially order theory, a partial order on a Set (mathematics), set is an arrangement such that, for certain pairs of elements, one precedes the other. The word ''partial'' is used to indicate that not every pair of elements need ...
that has alternating permutations as its linear extensions
Citations
References
*.
*.
* .
*
External links
* {{MathWorld , title=Alternating Permutation, urlname=AlternatingPermutation
Ross Tang, "An Explicit Formula for the Euler zigzag numbers (Up/down numbers) from power series"A simple explicit formula for ''A''
''n''.
"A Survey of Alternating Permutations" a preprint by
Richard P. Stanley
Permutations
Enumerative combinatorics