# Number of sequences of inscribed squares ending at the common point

Consider a sequence of inscribed squares constructed on an $$n \times n$$ grid.

The grid has the following coordinate system:

1. The unit square in the lower left corner has coordinates $$(1, 1)$$, and the upper right unit square has coordinates $$(n, n)$$.
2. The first coordinate corresponds to horizontal shifts, and the second coordinate corresponds to vertical shifts.

All sequences have the following construction:

1. The sequence starts from an $$n \times n$$ square.
2. The next element in the sequence is an $$(n - 1) \times (n - 1)$$ square inscribed in the previous square.
3. The last element of the sequence (unit square) is located in the square with coordinates $$(x, y)$$.

What is the general number of such sequences given the initial grid size ($$n$$) and the terminal element position $$(x, y)$$?

• Can you solve the analogous one-dimensional version? The posted version is just two copies of the one-dimensional version happening simultaneously. Commented May 25 at 15:10