Task 1. Ant Boris moves on a coordinate plane, starting from point $P_{0}=(0,0)$, moving to point $P_{1}=(1,0)$, and then along a spiral counterclockwise (see figure).

![](https://cdn.mathpix.com/cropped/2024_05_06_28232384f75e7013fa86g-1.jpg?height=357&width=359&top_left_y=403&top_left_x=547)

The points with integer coordinates that he reaches form the sequence $P_{n}$. Find the coordinates of point $P_{1557}$.
1. Ant Borya moves on a coordinate plane, starting from point $P_{0}=$ $(0,0)$, moving to point $P_{1}=(1,0)$, and further along a spiral counterclockwise (fig.).

![](https://cdn.mathpix.com/cropped/2024_05_06_f5f84d36fbe8931f4da4g-1.jpg?height=506&width=508&top_left_y=518&top_left_x=513)

The points with integer coordinates that he reaches form the sequence $P_{n}$. Find the coordinates of point $P_{1557}$.

Answer: $(20,17)$. Consider the points that are the bottom-right and top-left corners of the broken line, i.e., points of the form $(k, 1-k)$ and $(-k, k)$. It is easy to see that these are the points $P_{1}, P_{4}, P_{9}$, and so on. Indeed, the distance from the point $(k, 1-k)$ to $(-k, k)$ along the broken line is $4k-1$, which is the difference between $(2k)^2$ and $(2k-1)^2$. Similarly, the distance from $(-k, k)$ to $(k+1, -k)$ is $4k+1$, which is the difference between $(2k+1)^2$ and $(2k)^2$. By induction, we get that $P_{(2k-1)^2} = (k, 1-k)$ and $P_{(2k)^2} = (-k, k)$.

Notice that $(2 \cdot 20 - 1)^2 = 1521$. Therefore, point $P_{1521}$ has coordinates $(20, -19)$. Point $P_{1557}$ is 36 units higher, so it has coordinates $(20, 17)$.

± Correct reasoning with an arithmetic error leading to an incorrect answer. 4-5 points

- Correct answer without explanation. 1 point