<s>
In	O
combinatorial	O
mathematics	O
,	O
an	O
alternating	B-Algorithm
permutation	I-Algorithm
(	O
or	O
zigzag	B-Algorithm
permutation	I-Algorithm
)	O
of	O
the	O
set	O
{	O
1	O
,	O
2	O
,	O
3	O
,	O
...	O
,	O
n}	O
is	O
a	O
permutation	B-Algorithm
(	O
arrangement	O
)	O
of	O
those	O
numbers	O
so	O
that	O
each	O
entry	O
is	O
alternately	O
greater	O
or	O
less	O
than	O
the	O
preceding	O
entry	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
five	O
alternating	B-Algorithm
permutations	I-Algorithm
of	O
{	O
1	O
,	O
2	O
,	O
3	O
,	O
4}	O
are	O
:	O
</s>
<s>
This	O
type	O
of	O
permutation	B-Algorithm
was	O
first	O
studied	O
by	O
Désiré	O
André	O
in	O
the	O
19th	O
century	O
.	O
</s>
<s>
Different	O
authors	O
use	O
the	O
term	O
alternating	B-Algorithm
permutation	I-Algorithm
slightly	O
differently	O
:	O
some	O
require	O
that	O
the	O
second	O
entry	O
in	O
an	O
alternating	B-Algorithm
permutation	I-Algorithm
should	O
be	O
larger	O
than	O
the	O
first	O
(	O
as	O
in	O
the	O
examples	O
above	O
)	O
,	O
others	O
require	O
that	O
the	O
alternation	O
should	O
be	O
reversed	O
(	O
so	O
that	O
the	O
second	O
entry	O
is	O
smaller	O
than	O
the	O
first	O
,	O
then	O
the	O
third	O
larger	O
than	O
the	O
second	O
,	O
and	O
so	O
on	O
)	O
,	O
while	O
others	O
call	O
both	O
types	O
by	O
the	O
name	O
alternating	B-Algorithm
permutation	I-Algorithm
.	O
</s>
<s>
The	O
determination	O
of	O
the	O
number	O
An	O
of	O
alternating	B-Algorithm
permutations	I-Algorithm
of	O
the	O
set	O
{	O
1	O
,	O
...	O
,	O
n}	O
is	O
called	O
André	B-Algorithm
's	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
The	O
numbers	O
An	O
are	O
known	O
as	O
Euler	O
numbers	O
,	O
zigzag	O
numbers	O
,	O
or	O
up/down	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
When	O
n	O
is	O
even	O
the	O
number	O
An	O
is	O
known	O
as	O
a	O
secant	B-Algorithm
number	I-Algorithm
,	O
while	O
if	O
n	O
is	O
odd	O
it	O
is	O
known	O
as	O
a	O
tangent	B-Algorithm
number	I-Algorithm
.	O
</s>
<s>
A	O
permutation	B-Algorithm
is	O
said	O
to	O
be	O
alternating	O
if	O
its	O
entries	O
alternately	O
rise	O
and	O
descend	O
.	O
</s>
<s>
Some	O
authors	O
use	O
the	O
term	O
alternating	O
to	O
refer	O
only	O
to	O
the	O
"	O
up-down	O
"	O
permutations	B-Algorithm
for	O
which	O
,	O
calling	O
the	O
"	O
down-up	O
"	O
permutations	B-Algorithm
that	O
satisfy	O
by	O
the	O
name	O
reverse	O
alternating	O
.	O
</s>
<s>
Other	O
authors	O
reverse	O
this	O
convention	O
,	O
or	O
use	O
the	O
word	O
"	O
alternating	O
"	O
to	O
refer	O
to	O
both	O
up-down	O
and	O
down-up	O
permutations	B-Algorithm
.	O
</s>
<s>
There	O
is	O
a	O
simple	O
one-to-one	B-Algorithm
correspondence	I-Algorithm
between	O
the	O
down-up	O
and	O
up-down	O
permutations	B-Algorithm
:	O
replacing	O
each	O
entry	O
with	O
reverses	O
the	O
relative	O
order	O
of	O
the	O
entries	O
.	O
</s>
<s>
By	O
convention	O
,	O
in	O
any	O
naming	O
scheme	O
the	O
unique	O
permutations	B-Algorithm
of	O
length	O
0	O
(	O
the	O
permutation	B-Algorithm
of	O
the	O
empty	O
set	O
)	O
and	O
1	O
(	O
the	O
permutation	B-Algorithm
consisting	O
of	O
a	O
single	O
entry	O
1	O
)	O
are	O
taken	O
to	O
be	O
alternating	O
.	O
</s>
<s>
The	O
determination	O
of	O
the	O
number	O
An	O
of	O
alternating	B-Algorithm
permutations	I-Algorithm
of	O
the	O
set	O
{	O
1	O
,	O
...	O
,	O
n}	O
is	O
called	O
André	B-Algorithm
's	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
The	O
numbers	O
An	O
are	O
variously	O
known	O
as	O
Euler	O
numbers	O
,	O
zigzag	O
numbers	O
,	O
up/down	B-Algorithm
numbers	I-Algorithm
,	O
or	O
by	O
some	O
combinations	O
of	O
these	O
names	O
.	O
</s>
<s>
The	O
odd-indexed	O
zigzag	O
numbers	O
(	O
i.e.	O
,	O
the	O
tangent	B-Algorithm
numbers	I-Algorithm
)	O
are	O
closely	O
related	O
to	O
Bernoulli	O
numbers	O
.	O
</s>
<s>
If	O
Zn	O
denotes	O
the	O
number	O
of	O
permutations	B-Algorithm
of	O
{	O
1	O
,	O
...	O
,	O
n}	O
that	O
are	O
either	O
up-down	O
or	O
down-up	O
(	O
or	O
both	O
,	O
for	O
n	O
<	O
2	O
)	O
then	O
it	O
follows	O
from	O
the	O
pairing	O
given	O
above	O
that	O
Zn	O
=	O
2An	O
for	O
n≥2	O
.	O
</s>
<s>
The	O
Euler	B-Algorithm
zigzag	I-Algorithm
numbers	I-Algorithm
are	O
related	O
to	O
Entringer	B-Algorithm
numbers	I-Algorithm
,	O
from	O
which	O
the	O
zigzag	O
numbers	O
may	O
be	O
computed	O
.	O
</s>
<s>
The	O
Entringer	B-Algorithm
numbers	I-Algorithm
can	O
be	O
defined	O
recursively	O
as	O
follows	O
:	O
</s>
<s>
The	O
nth	O
zigzag	O
number	O
is	O
equal	O
to	O
the	O
Entringer	B-Algorithm
number	I-Algorithm
E(n, n )	O
.	O
</s>
<s>
The	O
numbers	O
A2n	O
with	O
even	O
indices	O
are	O
called	O
secant	B-Algorithm
numbers	I-Algorithm
or	O
zig	B-Algorithm
numbers	I-Algorithm
:	O
since	O
the	O
secant	O
function	O
is	O
even	O
and	O
tangent	O
is	O
odd	O
,	O
it	O
follows	O
from	O
André	O
's	O
theorem	O
above	O
that	O
they	O
are	O
the	O
numerators	O
in	O
the	O
Maclaurin	O
series	O
of	O
.	O
</s>
<s>
Secant	B-Algorithm
numbers	I-Algorithm
are	O
related	O
to	O
the	O
signed	O
Euler	O
numbers	O
(	O
Taylor	O
coefficients	O
of	O
hyperbolic	O
secant	O
)	O
by	O
the	O
formula	O
E2n	O
=(	O
1	O
)	O
nA2n	O
.	O
</s>
<s>
Correspondingly	O
,	O
the	O
numbers	O
A2n+1	O
with	O
odd	O
indices	O
are	O
called	O
tangent	B-Algorithm
numbers	I-Algorithm
or	O
zag	B-Algorithm
numbers	I-Algorithm
.	O
</s>
