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.
Given a sequence , the boustrophedon transform yields another sequence, , 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 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 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.