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?
Let K the circle with center (0,0)
Let r the radius of the circle.
Let g(r) are the lattice points lie within or on this circle. \([~g(r) :=|{(x,y)\in \mathbb{Z^2}|x^2+y^2\le r^2}|~]\)
We have four subsets A, B, C, and D with g(r) = A+B+C+D
Subset D:
For D there is no Formula in close form, but though we have:
\(\frac{D}{8} = [\sqrt{r^2 - a^2}] +[\sqrt{r^2 - (a+1)^2}] + \cdots + [\sqrt{r^2 - (r-1)^2}] \) with \(a =\left[ \dfrac{r}{\sqrt2} \right] + 1\) and
\([x] =\) greatest integer number
g(5) = ?
\(\begin{array}{|rcll|} \hline A &=& 1 \\ B &=& 4\cdot 5 \\ &=& 20 \\ C &=& 9\cdot 4 \quad &| \quad \left[ \dfrac{r}{\sqrt2} \right] = \left[ \dfrac{5}{\sqrt2} \right] = 3 \\ &=& 36 \\ D &=& 8\cdot ( [\sqrt{5^2 - 4^2}] ) \quad &| \quad a =\left[ \dfrac{5}{\sqrt2} \right] + 1 = 3 +1 = 4 \qquad r-1 = 5-1 = 4 \\ &=& 8\cdot ( [\sqrt{25 - 16}] ) \\ &=& 8\cdot ( [\sqrt{9}] ) \\ &=& 8\cdot [3] \\ &=& 8\cdot 3 \\ &=&24\\ \hline \end{array}\)
\(\begin{array}{|rcll|} \hline g(5) &=& A+B+C+D \\ &=& 1 + 20 + 36 + 24 \\ &=& 81 \\ \hline \end{array}\)
There are 81 lattice points.
Source: http://www.matheprisma.uni-wuppertal.de/Module/PIXXL/Worksheet/ws.pdf