# Squared rectangles

A squared rectangle is a rectangle dissected into squares. It is perfect if no two of the squares are the same size, and imperfect otherwise. It is simple if it contains no smaller squared rectangle, other than its component squares; if it is not simple it is compound. The number of squares a squared rectangle is divided into is called its order.

A squared rectangle might also be a square. The first perfect squared square is due to Sprague (Mathematische Zeitschrift, 45 (1939), pp. 607-608; a translation of the text of the article is available in TeX (3K), DVI (5K), Postscript (43K), or PDF (49K)) and was made by piecing squared rectangles together. The perfect squared square with smallest order, 21, was found by Duijvestijn and his computer; it is simple (Simple perfect squared square of lowest order, J. Combinatorial Theory, series B, 25 (1978), pp. 240-243.)

A squared rectangle can be described by its Bouwkamp code. This code is obtained by looking at a list of the horizontal segments found in the squared rectangle, ordered from top to bottom and starting with the top edge, and making, for each segment, a parenthesized list of the side-lengths of the squares immediately below the segment, going from left to right. For example, the squared square above has squares of lengths 50, 35, and 27 along its top edge, and its code runs:

(50,35,27)(8,19)(15,17,11)(6,24)(29,25,9,2)(7,18)(16)(42)(4,37)(33).

Sprague's squared square has Bouwkamp code

(1885,429,299,312,615,665)(221,78)(65,247)(143)(195,234)(325,39)(286) (565,50)(104,91)(52,182)(375,340)(13,130)(117)(1040)(35,305)(140,270) (705)(575)(696,551,638,2320)(145,319,87)(725)(667,174)(493)(957,522,406) (116,290)(435,203)(29,261)(232).