We drew a circle around the origin of the coordinate system, with a radius of $r=\sqrt{1000}$ units. How many lattice points are inside and on the circumference of this circle? (A lattice point is a point whose both coordinates are integers.) How many lattice points will be on the circle and inside it if the value of $r^{2}$ is taken as the following consecutive numbers: 999, 998, 997, 996, 995; 1001, 1002, 1003, 1004, 1005?
![](https://cdn.mathpix.com/cropped/2024_05_02_864983f445c2d2ff6d80g-1.jpg?height=681&width=982&top_left_y=131&top_left_x=558)

a) A square is inscribed in the circle, with its sides parallel to the axes. The circular segments cut off by the square are bisected by the segments of the axes that lie within them, and the lattice points in the resulting parts of the circle and on the dividing lines are counted, using symmetries for simplification.

The sides of the square are the lines $x = \pm \sqrt{500}$ and $y = \pm \sqrt{500}$. There are no lattice points on these lines because 500 is not a perfect square. $\sqrt{500} \approx 22.3 \ldots$, so all lattice points inside the square have both coordinates with absolute values not greater than 22. The number of these points is $(2 \cdot 22 + 1)^2 = 2025$.

The segments bisecting the circular segments have the same number of lattice points. The first lattice point on the positive $X$-axis segment $AB$ has an abscissa of 23, and the last one has an abscissa of 31, because the abscissa of $B$ is $r = 31.6 \ldots$. Thus, the number of lattice points on the segment is 31 - 22, and on the 4 such segments, it is 36.

Only the lattice points inside the semicircular segment $ABC$ and on the arc $BC$ remain to be counted, because the circle's yet unconsidered 7 parts can be obtained by $90^\circ$ rotations around the origin, reflections across the axes, and reflections across the bisector of the axes $OC$, and each such symmetry maps lattice points to lattice points.

To count the lattice points in the segment $ABC$, we group them by the lines $x = 23, 24, \ldots, 31$ that pass through them and are parallel to the $Y$-axis. For this, we create a table showing the $y$-coordinate of the intersection points of these lines with the arc $BC$, given by $y = \sqrt{1000 - x^2}$. The number of lattice points $n$ is always the integer part of $y$. The sum of the numbers in the $n$ column is 136, so the number of lattice points in the circle is

$$
2025 + 36 + 8 \cdot 136 = 3149
$$

| $x$ | $x^2$ | $y^2 = 1000 - x^2$ | $y$ | $n$ |
| :--- | :---: | :---: | :---: | ---: |
| 23 | 529 | 471 | $21.7 \ldots$ | 21 |
| 24 | 576 | 424 | $20.5 \ldots$ | 20 |
| 25 | 625 | 375 | $19.3 \ldots$ | 19 |
| 26 | 676 | 324 | 18 integer | 18 |
| 27 | 729 | 271 | $16.4 \ldots$ | 16 |
| 28 | 784 | 216 | $14.6 \ldots$ | 14 |
| 29 | 841 | 159 | $12.6 \ldots$ | 12 |
| 30 | 900 | 100 | 10 integer | 10 |
| 31 | 961 | 39 | $6.2 \ldots$ | 6 |

b) The above can be used for the further required values of $r^2$. In the squares corresponding to these values, the number of lattice points on the segment $AB$ and its symmetrical counterparts is the same as for $r^2 = 1000$, because the integer parts of the square roots of the smallest and largest $r^2$ values do not change:

$$
\begin{array}{ll}
\sqrt{497.5} = 22.3 \ldots, & \sqrt{995} = 31.5 \ldots \\
\sqrt{502.5} = 22.4 \ldots, & \sqrt{1005} = 31.7 \ldots
\end{array}
$$

The lattice points $(26, 18)$ and $(30, 10)$ lie on the arc $BC$. Therefore, when transitioning to smaller $r^2$ values, the number of lattice points in the segment $ABC$ decreases by 2, and in the circle by $8 \cdot 2 = 16$. A similar case can occur if the numbers in the $y^2$ column are successively decreased by 1, 2, ..., 5 and a perfect square is obtained. The only such case is for the line $x = 31$, where $997 - 31^2 = 6^2$. Thus, when $r^2$ is reduced to 996, the number of lattice points in the circle decreases by 8 again.

When increasing $r^2$ to 1005, the arc does not pass through any new lattice points, because the numbers in the $y^2$ column do not become perfect squares when increased by 1, 2, ..., 5. Therefore, for all examined values of $r^2$, the total number $N$ of lattice points inside and on the circumference of the circle, and the number $M$ of lattice points on the circumference are

![](https://cdn.mathpix.com/cropped/2024_05_02_864983f445c2d2ff6d80g-1.jpg?height=145&width=1113&top_left_y=2584&top_left_x=495)

Remarks. I. A slightly longer calculation shows that if the circle is centered at $(0.5, 0)$ or $(0.5, 0.5)$ with $r^2 = 1000$, the number of lattice points is 3144 in both cases.

2. A plausible conjecture (which can be proven with approximate precision without much difficulty) is that when a sufficiently large convex region is placed in the coordinate system, the number of lattice points inside the region is approximately equal to the area of the region. Based on this, we can obtain an approximate value of 3.14 for $\pi$ from our results.