Suppose we have a sphere centered at the origin of $\mathbb{R^{n}}$ with radius $r$. Are there known theorems that state the number of integer lattice points that lie on the sphere? It seems like this is something someone has studied so hopefully someone here could point me to some references.
Also, consider the lattice points that do lie on this sphere. Is there a known greatest lower bound to the number of neighbours (integer lattice points lying Euclidean distance $1$ away) of these lattice points that do not lie in the sphere as a function of $r$ and $n$?