Counting "lattice points" on a circle of radius $\sqrt{N}$

201 Views Asked by At

Many people of the online math community are familiar with this popular video, and this post refers to it: https://youtu.be/NaL_Cb42WyY ("Pi hiding in prime regularities").

In the video, $\chi (n)$ is defined as follows: $$\chi (n) = \begin{cases} 1 &\mbox{if } n \equiv 1\pmod 4 \\ -1 & \mbox{if } n \equiv -1 \pmod 4\\ 0& \mbox{if }n\equiv 0\pmod 2. \end{cases}$$

I understand the video, except for two things (they were not explained; the second one should have been present in the video, as it is the core of the main idea):

1) How to prove that $\chi (n_1)\chi (n_2)= \chi (n_1 n_2)$ using the above definition of $\chi$?

2) Writing down the case for general $N$ would be a bit messy, so I'll try to explain the idea using an example: How to prove that if, for example, $N=2^2 3^4 5^3$, then the number of lattice points on a circle with radius $\sqrt{N}$ is $$4\sum_{n=0}^2 \chi (2^n)\sum_{n=0}^4\chi (3^n)\sum_{n=0}^3 \chi (5^n)?$$

Based on the information given in the video, is it possible to show that we can use the $\chi$ function to count the lattice points (i.e. why can we exploit the $\chi$ function like that)? In the video, it's been already shown how to count the lattice points (in another way, therefore not using the $\chi$ function), but the reasoning behind the connection of the $\chi$ function to the number of lattice points remains obscure.

I guess the answer to the first question should be straightforward, but it's confusing that no one in the comment section of the video asked the second question. I watched it several times and still can't figure it out.