Q:

Is there a nice expression for the number of lattice points on a sphere?

Possible Duplicate:
Is there a simple way to compute the number of ways to write a positive integer as the sum of three squares? 

Is there a nice expression for the number of points in $\mathbb{Z}^3$ which lie a distance of $\sqrt{n}$ from the origin? Here, $n$ is of course a positive integer.

A:

We (me, Michel, and Venkatesh) write something about this question in the preprint  "Linnik's Ergodic method and the distribution of integral points on spheres."
In particular, in section 3 we explain how when n is squarefree and not congruent to 7 mod 8 the solution set of x^2 + y^2 + z^2 = n (up to the natural SO_3(Z) action) is naturally a torsor for a certain class group, so that in particular the size of the set is equal to the size of the class group.  None of this is really original to us, I should emphasize!  Maybe the use of the word "torsor," at most.

