Definitions
Nearby Words

# Boustrophedon transform

In mathematics, the boustrophedon transform is a procedure which maps one sequence to another. The transformed sequence is computed by filling a triangle in boustrophedon (zig-zag) manner.

## Definition

Given a sequence $\left(a_0, a_1, a_2, ldots\right)$, the boustrophedon transform yields another sequence, $\left(b_0, b_1, b_2, ldots\right)$, is constructed by filling up a triangle as pictured on the right. Number the rows in the triangle starting from 0, and fill the rows consecutively. Let k denote the number of the row currently being filled.

If k is odd, then put the number $a_k$ on the right end of the row and fill the row from the right to the left, with every entry being the sum of the number to the right and the number to the upper right. If k is even, then put the number $a_k$ on the left end 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 left.

The numbers $b_k$ forming the transformed sequence can then be found on the left end of odd-numbered rows and on the right end of even-numbered rows, that is, opposite to the numbers $a_k$.

## Recurrence relation

A more formal definition uses a recurrence relation. Define the numbers $T_\left\{k,n\right\}$ (with k ≥ n ≥ 0) by

$T_\left\{k,0\right\} = a_k quad mbox\left\{for \right\} k ge 0,$
$T_\left\{k,n\right\} = T_\left\{k,n-1\right\} + T_\left\{k-1,k-n\right\} quad mbox\left\{for \right\} k ge n > 0.$
Then the transformed sequence is defined by $b_n = T_\left\{n,n\right\}$.

## The up/down numbers

The up/down numbers $u_n$ count the number of alternating permutations of the set {1, 2, 3, …, n}, i.e. permutations that alternately rise and fall, starting with a rise. For example, u4 = 5, because there are five permutations of {1, 2, 3, 4} satisfying these conditions, namely:

• 1, 3, 2, 4
• 1, 4, 2, 3
• 2, 3, 1, 4
• 2, 4, 1, 3
• 3, 4, 1, 2

The following figure illustrates the five alternating permutations of {1, 2, 3, 4} that begin with a rise:

The sequence of up/down numbers starts as follows:

$u_0 = 1, u_1 = 1, u_2 = 1, u_3 = 2, u_4 = 5, u_5 = 16, u_6 = 61, ldots ,$
This sequence is the boustrophedon transform of the unit sequence
$1, 0, 0, 0, ldots ,$
For this reason, the up/down numbers are also called the boustrophedon transform numbers.

The even up/down numbers are related to the Euler numbers $E_n$ and the odd up/down numbers are related to the Bernoulli numbers $B_n$:

$u_\left\{2k\right\} = \left(-1\right)^k E_\left\{2k\right\} qquad mbox\left\{for \right\} k=0,1,2,ldots, ,$

$u_\left\{2k-1\right\} = frac\left\{\left(-1\right)^\left\{k-1\right\} 4^k \left(4^k-1\right) B_\left\{2k\right\}\right\}\left\{2k\right\} qquad mbox\left\{for \right\} k=1,2,3,ldots. ,$

## The exponential generating function

The exponential generating function of a sequence (an) is defined by

$EG\left(a_n;x\right)=sum _\left\{n=0\right\}^\left\{infty\right\} a_n frac\left\{x^n\right\}\left\{n!\right\}.$
The exponential generating function of the boustrophedon transform (bn) is related to that of the original sequence (an) by
$EG\left(b_n;x\right) = \left(sec x + tan x\right) , EG\left(a_n;x\right).$

The exponential generating function of the unit sequence is 1, so that of the up/down numbers is

$EG\left(u_n;x\right) = sec x + tan x = tanleft\left(\left\{x over 2\right\} + \left\{pi over 4\right\}right\right). ,$
This explains why the up/down numbers appear as the Taylor coefficients of the tangent and secant functions.

## References

• Jessica Millar, N.J.A. Sloane, Neal E. Young, "A New Operation on Sequences: the Boustrouphedon Transform," Journal of Combinatorial Theory, Series A, volume 76, number 1, pages 44–54, 1996. Also available in a slightly different version as e-print math.CO/0205218 on the arXiv.