In a three-dimensional Cartesian coordinate system, we draw a sphere with a radius of 10 units around the origin and the point $(1 / 2,1 / 2,0)$. How many lattice points are on the surface and inside the sphere in each case? What approximate value of $\pi$ do we get from the calculations?[^0]

[^0]:    ${ }^{1}$ See the solutions to problems 1335 and 1311, K. M. L. 31 (1965) pp. 20-22, and 30 (1965) p. 74.
I. Solution. a) For the points $P$ on the first spherical surface, the sum of the squares of the $x, y, z$ coordinates is equal to 100, because this expression gives the square of the distance $O P$; for the internal points, $x^{2}+y^{2}+z^{2} < 100$. When summing the number of $N$ values obtained for $x^{2}+y^{2}+z^{2} < 100$ twice and the one corresponding to $z=0$ once, the number of lattice points inside and on the surface of the sphere is $N_{a}=4169$ (of which 30 are on the surface).

| $z$ | $=$ | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| $r^{2}$ | $=$ | 0 | 19 | 36 | 51 | 64 | 75 | 84 | 91 | 96 | 99 | 100 |
| $N$ | $=$ | 1 | 61 | 113 | 161 | 197 | 241 | 261 | 293 | 293 | 305 | 317 |
| $N^{\prime}$ | $=$ | 0 | 60 | 112 | 164 | 208 | 240 | 256 | 284 | 300 | 316 | 316 |

b) For the sphere with radius $r=10$ centered at $K(1 / 2,1 / 2,0)$, the counting of lattice points using the same principle results in the $N^{\prime}$ values listed in the fourth row of the table, and the number of lattice points in the sphere is $N_{b}=4196$ (all inside the sphere).

Similar to the second remark for the solution of problem 1335, it is natural to conjecture that the number of lattice points inside a sufficiently large convex body placed in the coordinate system is approximately equal to the measure of the volume of the body.

The volume of our sphere is $10^{3} \cdot 4 \pi / 3$, and the approximate value of $\pi$ from this is $3 N_{a} / 4000=3.12675$, or $3 N_{b} / 4000=3.147$.

II. Solution. To count the lattice points in question, we group those above the $X Y$ plane according to the spherical chords (half-chords) parallel to the $Z$ axis. These chords pass through some lattice point $(x, y)$ within the circle $x^{2}+y^{2}=100$ in the $X Y$ plane, and the square of their distance from the center of the sphere is $x^{2}+y^{2}$. Therefore, the square of their half-length is $100-x^{2}-y^{2}$, and the number of lattice points on them is the integer part of the square root of this value. The number of lattice points is given by the sum of these values, doubled, plus the number of lattice points in the circle.

The calculation along the chords can be done, considering the symmetries, for the points in the $1/8$ part of the circle and on the bounding radii, where $x \geq y \geq 0$. The numbers written above each lattice point in part $\alpha$ of the second figure are the values of $x^{2}+y^{2}$, and below them are the corresponding number of lattice points.

The sum of the numbers written next to the lattice points on the two radii is 69 and 48, respectively, totaling 117. In the interior of the sector, we wrote 9 for 4 lattice points, 8 for 5, 7 for 5, 6 for 4, 5 for 5, 4 for 2, 3 for 4, and 1 for 1, summing to 181. Therefore, the number of lattice points inside and on the curved surface of the upper hemisphere is $1 \cdot 10 + 4 \cdot 117 + 8 \cdot 181 = 1926$. Finally, the desired number is $2 \cdot 1926 + 317 = 4169$.

![](https://cdn.mathpix.com/cropped/2024_05_02_e2d100645ab673f4d7aeg-2.jpg?height=894&width=1352&top_left_y=117&top_left_x=381)

For the second sphere, the square of the distance of the chords from $K$ is

$$
d^{2}=(x-1 / 2)^{2}+(y-1 / 2)^{2}=x^{2}-x+y^{2}-y+1 / 2
$$

so the square of the half-length of the chord is $99.5 - x^{2} - y^{2} + x + y$, which is not an integer, so its endpoint cannot be a lattice point. For simplicity, we wrote the rounded integer value of $d^{2}$ in the lattice points of the above pattern (in part $\beta$ of the second figure, the $1/8$ part of the circle $(x-1 / 2)^{2} + (y-1 / 2)^{2} = 100$ in the $x \leq y \leq 0$ octant is shown), and again the number of lattice points on the half-chord, excluding the point in the $X Y$ plane. The sum on the bisector of the axes is 51, in the sector 217, so the number of lattice points inside the hemisphere is $4 \cdot 51 + 8 \cdot 217 = 1940$, and in the entire sphere $2 \cdot 1940 + 316 = 4196$.

Jenő Deák (Budapest, Kölcsey F. g. IV. o. t.)

![](https://cdn.mathpix.com/cropped/2024_05_02_e2d100645ab673f4d7aeg-2.jpg?height=564&width=699&top_left_y=1537&top_left_x=694)

Remark. In case a), the calculation according to the second $\alpha$ figure can be simplified for the points in the I. and II. quadrants if we divide the sphere into parts with the faces of the inscribed cube, whose edges are parallel to the axes, as seen in the 1311th problem (3rd figure). The half-length of the cube's edge is $10 / \sqrt{3} \approx 5.8$ units, so no face passes through a lattice point. The number of lattice points inside the cube is $(2 \cdot 5 + 1)^{3} = 1331$. The number of lattice points in the protrusion above one cube face can be calculated according to the I. quadrant, leaving out the lower 5 lattice points of each half-chord: $5 + 4(19 + 17) + 8 \cdot 33 = 413$. The number of lattice points in the corners formed by the edges is calculated according to the II. quadrant, considering the full length of the chords and the 2 lattice points on the circumference of the circle in the $X Y$ plane:

$$
11 + 3 + 2 \cdot 7 + 2 \cdot 1 = 30
$$

According to all this, the number of lattice points is $1331 + 6 \cdot 413 + 12 \cdot 30 = 4169$.