= Euler zigzag number
{c}
{title2=$A_n$}
= Euler zigzag sequence
{c}
{synonym}
The <Euler zigzag number> $A_n$ counts <permutations> $a_1\cdots a_n$ satisfying $a_1<a_2>a_3<a_4>\cdots$. Reversing every inequality gives the same count by replacing each label $a$ with $n+1-a$. The first values, starting at $n=0$, are $1,1,1,2,5,16$. For $n=3$ the two upward-starting examples are `132` and `231`. Their <exponential generating function> is
$$
\sum_{n\geq0}A_n\frac{x^n}{n!}=\sec x+\tan x.
$$
This convention fixes the direction of the first inequality; adding both directions for $n\geq2$ doubles the count.<Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley>[§1.6.1, alternating permutations]{ref}
Back to article page