The polygonal line in the figure starts from the origin and passes through all points in the plane that have non-negative integer coordinates, according to the indicated pattern. The unit of length on the axes is $1 \mathrm{~cm}$. The length of the polygonal line from the origin to a point $(a, b)$ is called the lonjura of $(a, b)$; for example, the lonjura of $(1,2)$ is $5 \mathrm{~cm}$.

![](https://cdn.mathpix.com/cropped/2024_05_01_c051a4aaadd76ab6970bg-11.jpg?height=539&width=463&top_left_y=707&top_left_x=702)

a) Determine the lonjura of the points $(3,2)$ and $(0,4)$.

b) How many points with integer coordinates are contained within and on the sides of the square whose vertices are $(0,0),(n, 0),(n, n)$, and $(0, n)$?

c) Explain why the lonjura of the point $(n, n)$ is $n^{2}+n$.

d) What is the point whose lonjura is $425 \mathrm{~cm}$?
Solution

a) By direct counting, we see that the lonjura of $(3,2)$ is 11 and that of $(0,4)$ is 16.
![](https://cdn.mathpix.com/cropped/2024_05_01_c051a4aaadd76ab6970bg-37.jpg?height=402&width=714&top_left_y=2260&top_left_x=571)
b) The points with integer coordinates inside and on the sides of this square form $n+1$ rows, each with $n+1$ points; the total number of points inside and on the sides of this square is then $(n+1)^{2}$. Excluding the border of this square, there remains a square of $n-1$ rows and $n-1$ columns, which contains $(n-1)^{2}$ integer points; it follows that the number of points on the border of the original square is $(n+1)^{2}-(n-1)^{2}=4 n$.

Note: One can also calculate the number of points with integer coordinates in the square by noting that from $(0,0)$ to $(0,1)$ the polygonal line passes through $1+3=2^{2}$ points; from $(0,0)$ to $(2,0)$ the polygonal line passes through $1+3+5=3^{2}$ points, from $(0,0)$ to $(0,3)$ the polygonal line passes through $1+3+5+7=4^{2}$ points, and so on. Therefore, the number of integer points in the square that has one of its vertices at the point $(n, n)$ is $(n+1)^{2}$.

c) $1^{\text{st}}$ solution: To go from $(0,0)$ to $(1,1)$ are 2 steps, from $(1,1)$ to $(2,2)$ are 4 steps, from $(2,2)$ to $(3,3)$ are 6 steps, and so on. Therefore, to reach the point $(n, n)$, it will take $2+4+6+\cdots+2n = 2 \times (1+2+3+\cdots+n) = 2 \frac{n(n+1)}{2} = n^2 + n$ steps.

$2^{\text{nd}}$ solution: The polygonal line reaches the point $(n, n)$ passing through all the points with integer coordinates inside and on the border of the square from the previous item, with the exception of the $n$ points on the horizontal from $(0, n)$ to $(n-1, n)$, if $n$ is odd, or the vertical from $(n, 0)$ to $(n, n-1)$, if $n$ is even. Therefore, the polygonal line passes through $(n+1)^2 - n = n^2 + n + 1$ points, including its endpoints, and its length is then $n^2 + n$.

d) $1^{\text{st}}$ solution: Since $425 = (20^2 + 20) + 5$ and $20^2 + 20$ is the lonjura of the point $(20,20)$, we see that to reach the point with lonjura 425, we must reach $(20,20)$ and walk 5 more segments along the polygonal line. Since 20 is even, these segments will start from the point $(20,20)$ vertically downward; thus, we arrive at the point $(20,15)$, which is the point we are looking for.

$2^{\text{nd}}$ solution: To go from $(0,0)$ to $(1,1)$ are 2 steps; from $(1,1)$ to $(2,2)$ are 4 steps, from $(2,2)$ to $(3,3)$ are 6 steps, and so on. Therefore, to reach the point $(20,20)$, it will take $2+4+6+\cdots+40 = 2 \times (1+2+3+\cdots+20) = 2 \times 210 = 420$ steps. From there, the solution proceeds as above.