A square of side length is rolling around the inside of a larger square of side length , always touching the larger square but without sliding. Initially the two squares share a common corner. At each step, the small square rotates clockwise about a corner that touches the large square, until another of its corners touches the large square. Here is an illustration of the first three steps for .
For some values of , the small square may return to its initial position after several steps. For example, when , this happens in steps; and for it happens in steps.
Let be the number of different values of for which the small square first returns to its initial position within at most steps. For example, , with the corresponding values:
the first three in steps and the last one in steps. Note that it does not matter whether the small square returns to its original orientation. Also .