A circle of radius 5 with its center at $(0,0)$ is drawn on a Cartesian coordinate system. How many lattice points (points with integer coordinates) lie within or on this circle?
Start with the 4 "poles" i.e (5,0), (0,5), (-5,0), (0,-5)
Each quadrant of the circle has 2 integer values (3,4) and (4,3) - Since (3,4,5) is a pythagorean triple
4 quadrants give 8 more points so 12 points in total
The total number of lattice ponts is given by
1 + (4 * 5) +
4 * [ floor √[ 5^2 - 1^2] + floor √ [5^2 - 2^2] + floor √[5^2 - 3^2] + floor √[5^2 - 4^2] ] =
1 + 20 +
4 * [ floor √24 + floor √21 + floor √16 + floor √9 ] =
21 + 4 [ 4 + 4 + 4 + 3 ] =
21 + 4 [ 15] =
81
A circle of radius 5 with its center at $(0,0)$ is drawn on a Cartesian coordinate system.
How many lattice points (points with integer coordinates) lie within or on this circle?
A Calculation of the Number of Lattice Points within or on the circle:
Let \( \lfloor x \rfloor \) be the largest integer equal to or less than x.
Example:
\(\lfloor 3.53553390593 \rfloor = 3\)
\(\lfloor -3.53553390593 \rfloor = -4\)
Noted by Gauss:
Let r radius of the circle = 5
Let \(x = r^2\)
\(\begin{array}{|rcll|} \hline A_2(x) &=& 1 + 4\lfloor \sqrt{x} \rfloor + 4 \lfloor \sqrt{\frac{x}{2}} \rfloor ^2 + 8 \sum \limits_{y_1= \lfloor \sqrt{\frac{x}{2}} \rfloor + 1 }^{\lfloor \sqrt{x} \rfloor} \lfloor \sqrt{x-y_1^2} \rfloor \qquad & | \quad x = r^2 = 5^2 \\\\ &=& 1 + 4\lfloor \sqrt{5^2} \rfloor + 4 \lfloor \sqrt{\frac{5^2}{2}} \rfloor ^2 + 8 \sum \limits_{y_1= \lfloor \sqrt{\frac{5^2}{2}} \rfloor + 1 }^{\lfloor \sqrt{5^2} \rfloor} \lfloor \sqrt{5^2-y_1^2} \rfloor \\\\ &=& 1 + 4 \cdot 5 + 4 \cdot 3 ^2 + 8 \sum \limits_{y_1= 3 + 1 }^{5} \lfloor \sqrt{5^2-y_1^2} \rfloor \\\\ &=& 1 + 4 \cdot 5 + 4 \cdot 3 ^2 + 8 \sum \limits_{y_1= 4 }^{5} \lfloor \sqrt{5^2-y_1^2} \rfloor \\\\ &=& 1 + 4 \cdot 5 + 4 \cdot 3 ^2 + 8 \cdot \left( \lfloor \sqrt{5^2-4^2} \rfloor +\lfloor \sqrt{5^2-5^2} \rfloor \right) \\\\ &=& 1 + 4 \cdot 5 + 4 \cdot 3 ^2 + 8 \cdot \left( 3 + 0 \right) \\\\ &=& 1 + 4 \cdot 5 + 4 \cdot 3 ^2 + 24 \\\\ &=& 1 + 20 + 36 + 24 \\ &\mathbf{=} & \mathbf{81} \\ \hline \end{array}\)
81 lattice points (points with integer coordinates) lie within or on this circle with radius 5.
Example:
\(r = 0 \ldots 20\)
Number of lattice points in circle:
\(\begin{array}{|r|r|r|} \hline r & \text{lattice points in circle} & \text{lattice points in sphere } \\ \hline 0 & 1 & 1 \\ 1 & 5 & 7 \\ 2 & 13 & 33 \\ 3 & 29 & 123 \\ 4 & 49 & 257 \\ {\color{red}5} & {\color{red}81} & 515 \\ 6 & 113 & 925 \\ 7 & 149 & 1419 \\ 8 & 197 & 2109 \\ 9 & 253 & 3071 \\ 10 & 317 & 4169 \\ 11 & 377 & 5575 \\ 12 & 441 & 7153 \\ 13 & 529 & 9171 \\ 14 & 613 & 11513 \\ 15 & 709 & 14147 \\ 16 & 797 & 17077 \\ 17 & 901 & 20479 \\ 18 & 1009 & 24405 \\ 19 & 1129 & 28671 \\ 20 & 1257 & 33401 \\ \hline \end{array} \)