Determining finitude or infinitude from a simple geometric construction

Playing with a pencil on a checkered sheet I encountered this construction:

1) take a point $A$ on the grid and a point $B$ that is distant from $A$ $n=2,3,4...$ horizontal steps and $1$ vertical step, so that $\overline{AB}=\sqrt{n^2+1}$.

2) complete a square $ABCD$ on the grid starting from the segment $AB$. This is the square $Q_0$.

3) Starting from $A$ take a point $A_1$ at the first intersection of $AB$ with a line of the grid. And do the same starting from the other points $B,C,D$ finding the points $B_1,C_1,D_1$ .

4) connect the points $A_1, B_1,C_1,D_1$, so that we have a new square $Q_1$.

5) redo the same points $3$ and $4$ and find the square $Q_2$ and so again...

The result is a sequence $S_n$ of squares whose sides, orientation, and number of different elements depend from $n$.

The figures show the construction for $n=2$, and for $n=3$.

enter image description here

enter image description here

Note that it seems that the sequence $S_2$ has infinite different elements that converge to a square of the grid, but $S_3$ has a finite number of different elements.

So a first question is:

How we can prove that the number of different elements of $S_n$ is finite or not and, if finite, what is this number?

A second question is to find the length of the last square in the sequence, or the limit of the lengths if the sequence has infinite different elements.

More general, the side lengths of all the squares in a sequence $S_n$ can be determined in some way that does not require a terribly boring calculation?


Added: construction of the first six elements of $S_4$.

enter image description here


For even n

Take the centre of the initial square as the origin and let the grid lines have equations $x=n$ and $y=n$ where $n$ is an odd integer.

At a given stage let one of the vertices of the current square be $A_n(a,b)$ where $a,b>0$. (Note that the initial square satisfies this.). Define the valuation of the square to be $\left \lceil{a}\right \rceil+\left \lceil{b}\right \rceil$.

In an anti-clockwise direction, the next vertex of the current square is $B_n(-b,a)$.

RESULT 1. If $n>2$, only the initial square has vertices with both coordinates integers. If $n=2$ then only the first two squares have vertices with both coordinates integers.

The initial square has a vertex $(n-1,n+1)$ where $n$ is an integer. However, the next square has a vertex $(n-3,n+1-\frac{2}{n})$ and, for $n>2$, only one coordinate is integral. (For $n=2$ one has to calculate one further square.) Now suppose that precisely one of $a$ and $b$ is integral but that there is a point $(u,v)$ on $A_nB_n$ with both $u$ and $v$ integral. Then $$\frac{v-b}{u-a}=\frac{v-a}{u+b}$$ $$(v+u)a+(v-u)b=a^2+b^2$$ If $d\ne 1$ is the denominator of one of $a$ and $b$ then multiplying the previous equation by $d$ makes just one side integral, a contradiction.

RESULT 2. Every square has a vertex in each quadrant. (We can therefore define the valuation of all squares.)

The only alternative would be if a vertex lay on an axis. In that case the vertex would have a zero coordinate as well as the coordinate lying on a grid line in contradiction of Result 1.

RESULT 3. For $n>2$, the valuation of successive squares decreases until $a=1$. (Since valuation is a positive integer we can therefore reduce the problem to this case.)

The gradient $g$ of $A_nB_n$ is given by $\frac{b-a}{b+a}$ and therefore $-1<g<1$. Then, for a point moving along this line from $A_n$ to $B_n$, the $x$-coordinate reduces and changes faster than the $y$-coordinate.

For $b>a>1$ (which is true for the initial square) then both $x$ and $y$-coordinate decrease and so $A_nB_n$ crosses a grid line where $y>x\ge 1$. Furthermore one of $x$ and $y$ is now an (odd) integer and so the valuation has decreased.

RESULT 4. From all cases with $a=1$ one can generate squares until we reach $a=1,b=1+\delta$, where $1>\delta>0.$

My proof of this is messy. It is like the proof of the next result but splits into several cases.

RESULT 5. From $a=1,b=1+\delta$, where $1>\delta>0,$ there is an infinite sequence of squares converging (monotonically) to the unit square.

With reference to the vertex in the first quadrant, direct calculation shows that from $(1,1+\delta)$ one obtains $(1+\frac{\delta^2}{2+\delta},1)$ and from $(1+\delta,1)$ one obtains $(1,1+\frac{\delta^2}{2+\delta})$.

For odd n

In this case we can use grid lines at the integers and have an initial square with vertex $(k,k+1)$.

As for $n$ even, we therefore start with a vertex $(a,b)$ such that $b>a$. For odd $n$, the $y$-axis is a grid line and so the process of Result 3 results after a finite number of iterations in a square with a vertex on that axis, at $(0,d)$ say, and therefore also at $(d,0)$.

Suppose $d\ge 1$. Starting with $(d,0)$, a vertex of subsequent squares will stay in the region $x+y\le d$ until another point on the $y$-axis is obtained, $(0,f)$ say. At some stage in this process there must have been a vertex$(1,e)$ where $e\le d-1$. The line from $(1,e)$ to $(-e,1)$ crosses the $y$-axis at $(0, \frac{e^2+1}{e+1})$ and therefore $f\le \frac{e^2+1}{e+1}<\text {max} \{1,e\}\le \text {max} \{1,d-1\}$.

Hence, after a finite number of iterations there will be a square with a vertex at $(0,t)$ for $t\le 1$. The process then ends.


This is not a full answer, but also longer than a comment. I want to share my insights.

If $n$ is even, the center of mass of the initial square is not on one of the grid points (lattice points). Another observation, the center of mass will always be the center of mass of a unit square in the grid. Last observation, by construction, we are creating smaller and smaller squares which share the same center of mass. Due to these three observations, I believe for even $n$, the limit will be the unit square around the center of mass.

For odd $n$, the center of mass of the initial square will be a grid point. The construction process above will stop when the half of the diagonal of the final square is less than unit length. This can be easily proven by observing that the circle with center at the grid point and radius equal to the half of the diagonal intersects with the grid only at the corners of the final square and nowhere else. Now, the issue is to figure out how the length of the diagonal changes throughout the process.

Conjecture for odd $n$: as $n\to\infty$, final square will converge to the circle in $l_1$ norm. This is a good counterpart for even $n$, because $S_n$ converges to the circle in $\max$-norm.