# Boustrophedon transform

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

## Definition

The boustrophedon transform: Start with the original sequence (in blue), then add numbers as indicated by the arrows, and finally read off the transformed sequence on the other side (in red, with $b_0 = a_0$).

Given a sequence $(a_0, a_1, a_2, \ldots)$, the boustrophedon transform yields another sequence, $(b_0, b_1, b_2, \ldots)$, which 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.

Defining $b_0 = a_0$, the numbers $b_k | k > 0$ 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_{k,n}$ (with k ≥ n ≥ 0) by

$T_{k,0} = a_k \quad \text{for } k \ge 0,$
$T_{k,n} = T_{k,n-1} + T_{k-1,k-n} \quad \text{for } k \ge n > 0.$

Then the transformed sequence is defined by $b_n = T_{n,n}$.

In the case a0 = 1, an = 0 (n > 0), the resulting triangle is called the Seidel–Entringer–Arnold Triangle and the numbers $T_{k,n}$ are called Entringer numbers (sequence A008281 in OEIS). In this case the numbers in the transformed sequence bn are called the Euler up/down numbers. This is sequence A000111 on the On-Line Encyclopedia of Integer Sequences. These enumerate the number of alternating permutations on n letters and are related to the Euler numbers and the Bernoulli numbers.

## The exponential generating function

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

$EG(a_n;x)=\sum _{n=0}^{\infty} a_n \frac{x^n}{n!}.$

The exponential generating function of the boustrophedon transform (bn) is related to that of the original sequence (an) by

$EG(b_n;x) = (\sec x + \tan x) \, EG(a_n;x).$

The exponential generating function of the unit sequence is 1, so that of the up/down numbers is sec x + tan x.

## 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.
• Weisstein, Eric W. (2002). CRC Concise Encyclopedia of Mathematics, Second Edition. Chapman & Hall/CRC. p. 273. ISBN 1-58488-347-2.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 15, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://en.wikipedia.org/wiki/Boustrophedon_transform", "fetch_time": 1411167750000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2014-41/segments/1410657132025.91/warc/CC-MAIN-20140914011212-00233-ip-10-196-40-205.us-west-1.compute.internal.warc.gz", "warc_record_offset": 95047400, "warc_record_length": 10663, "token_count": 858, "char_count": 3077, "score": 4.6875, "int_score": 5, "crawl": "CC-MAIN-2014-41", "snapshot_type": "longest", "language": "en", "language_score": 0.8481701016426086, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00056-of-00064.parquet"}