Question:
Find the number of points with integer co-ordinates that lie inside the circle: $$x^2+y^2=36$$
My Approach:
I drew the figure and counted!
I counted the number of points inside the $1^{st}$ quadrant and multiplied that by $4$.
After that I moved on to count the points on the axes.
Finally I was able to get the correct answer ($109$).
Is there a better way to solve these kind of questions?
Counting seems way too basic and time consuming.
Here is a an slightly advanced way how to solve this problem. For any $n\in \mathbb{N}$ one can consider $r(n):=|\{(x,y)\in \mathbb{Z}^2: x^2+y^2=n\}|$. One can show that $r(n)=4\rho(n)$, where $\rho(n)=\sum \limits_{d\mid n}\chi_4(d)$, where $\chi_4$ is a non-principal character $\text{mod}\ 4$, i.e. $\chi_4(d)=\sin \dfrac{\pi d}{2}$.
Easy to see that $$|\{(x,y)\in \mathbb{Z}^2: x^2+y^2\leq 36\}|=1+4\sum \limits_{n=1}^{36}\sum \limits_{d\mid n}\sin \dfrac{\pi d}{2}=$$ $$=1+4\sum \limits_{d=1}^{36}\sin \frac{\pi d}{2}\sum\limits_{1\leq n\leq 36, d\mid n}1=$$ $$=1+4\sum \limits_{d=1}^{36}\sin \frac{\pi d}{2}\left\lfloor \frac{36}{d}\right\rfloor=$$ $$=1+4\sum \limits_{k=0}^{17}(-1)^{k}\left\lfloor \frac{36}{2k+1}\right\rfloor=$$ $$=1+4\left(\left\lfloor \frac{36}{1}\right\rfloor+\left\lfloor \frac{36}{5}\right\rfloor+\dots+\left\lfloor \frac{36}{33}\right\rfloor\right)-$$ $$-4\left(\left\lfloor \frac{36}{3}\right\rfloor+\left\lfloor \frac{36}{7}\right\rfloor+\dots+\left\lfloor \frac{36}{35}\right\rfloor\right)=$$ $$=1+4(36+19)-4\cdot 27=113.$$
So the correct answer is actually $113$.