Show that the number $r(n)$ of representations of $n$ as a sum of two squares has $\pi$ as arithmetic mean, that is \[\lim_{n \to \infty}\frac{1}{n}\sum^{n}_{m=1}r(m) = \pi.\]
Problem
Source:
Tags: limit, calculus, integration, geometry, 3D geometry, inequalities, triangle inequality
18.09.2007 06:21
We prove the following generalisation: \[ \lim_{n\to\infty}\frac{1}{n}\sum^{n}_{m=1}r_{k}(m)=V(B_{1}^{k})=\frac{\pi^{\frac{n}{2}}}{\Gamma\left(1+\frac{n}{2}\right)}.\] Here $ r_{k}(m)$ denotes the number of representations of $ m$ as sum of $ k$ squares (reordering and different signs counted as different representations), $ B_{1}^{k}$ is the unit ball (of radius $ 1$) in $ k$ dimensions, $ V(B_{1}^{k})$ is it's volume and $ \Gamma$ is the Gamma-Function. In other words: the arithmetic mean of the number of representations is the volume of a unit ball. Lemma 1: $ \sum_{m = 0}^{n}r_{k}(m)$ is the number $ L(n)$ of (integral) lattice points in $ B_{\sqrt n}^{k}$ ($ k$-dimensional ball around $ 0$ with radius $ \sqrt n$). Proof: This is just simple counting: a representation $ m = a_{1}^{2}+a_{2}^{2}+...+a_{k}^{2}$ of $ m\leq n$ gives a lattice point $ (a_{1}, a_{2}, ..., a_{k})$ inside the ball, and conversely every such point gives a representation the same way. Lemma 2: We have $ V(B_{\sqrt{n}-c_{1}}^{k})\leq L(n)\leq V(B_{\sqrt{n}+c_{2}}^{k})$ for some positive real constants $ c_{1},c_{2}$ not depending on $ n$. Proof: We take $ c_{1}=\frac{\sqrt k}{2}= c_{2}$: Around every lattice point $ a = (a_{1}, a_{2}, ..., a_{k})$ we can draw a [closed] cube $ C(a)$ of volume $ 1$ having the $ 2^{k}$ vertices $ (a_{1}\pm\frac{1}{2}, a_{2}\pm\frac{1}{2}, ..., a_{k}\pm\frac{1}{2})$ (all combinations of $ \pm$ used). Thus a point $ x = (x_{1}, x_{2}, ..., x_{k})$ is in $ C(a)$ iff $ |a_{i}-x_{i}|\leq\frac{1}{2}$. Especially, if $ a,b$ are two different lattice points, $ C(a)$ and $ C(b)$ do not share any interior points, thus $ V\left( C(a)\cup C(b)\right) = V\left( C(a)\right)+V\left( C(b)\right)$. Denote by $ L_{n}$ the set of lattice points in $ B_{\sqrt n}^{k}$ (thus $ |L_{n}| = L(n)$). Define $ C_{n}=\bigcup_{a\in L_{n}}C(a)$. We get that $ V(C_{n}) = V\left(\bigcup_{a\in L_{n}}C(a)\right) =\sum_{a\in L_{n}}V\left( C(a)\right) =\sum_{a\in L_{n}}1 = |L_{n}| = L(n)$. By this, it suffices to show that \[ B_{\sqrt{n}-c_{1}}^{k}\subseteq C_{n}\subseteq B_{\sqrt{n}+c_{2}}^{k}.\] Left $ \subset$: Let $ [x]$ denote an integer closest to a real number $ x$ (taky any if there is more than one), especially $ \left| x-[x]\right|\leq\frac{1}{2}$. If $ x = (x_{1}, x_{2}, ..., x_{k})\in B_{\sqrt{n}-c_{1}}^{k}= B_{\sqrt{n}-\frac{\sqrt k}{2}}^{k}$, we take $ a = (a_{1}, a_{2}, ..., a_{k}) : = ([x_{1}], [x_{2}] , ..., [x_{k}])$. It is a lattice point, and by $ |a_{i}-x_{i}| =\left| [x_{i}]-x_{i}\right|\leq\frac{1}{2}$ we get $ x\in C(a)$. The triangle inequality gives $ \parallel a-x\parallel\leq\frac{1}{2}\parallel (1,1,...,1)\parallel =\frac{\sqrt k}{2}$, giving $ \parallel a\parallel\leq\parallel x\parallel+\frac{\sqrt k}{2}\leq\sqrt n-\frac{\sqrt k}{2}+\frac{\sqrt k}{2}=\sqrt n$, thus that $ a\in L_{n}$ and that $ C(a)\subset C_{n}$, giving $ x\in C_{n}$. Right $ \subset$: If $ x\in C_{n}$, we get that $ x = a+c$ for some $ a\in L_{n}$ and some $ c = (c_{1}, c_{2}, ..., c_{k})$ with $ |c_{i}|\leq\frac{1}{2}$. Using triangle inequality again gives $ \parallel x\parallel\leq\parallel a\parallel+\parallel c\parallel\leq\sqrt n+\frac{\sqrt k}{2}$. Using Lemma 2, we get \[ \frac{(\sqrt{n}-c_{1})^{2}}{n}V(B_{1}^{k})=\frac{1}{n}V(B_{\sqrt{n}-c_{1}}^{k})\leq\frac{1}{n}L(n)\leq\frac{1}{n}V(B_{\sqrt{n}+c_{2}}^{k})=\frac{(\sqrt{n}+c_{2})^{2}}{n}V(B_{1}^{k}).\] Taking limits, the result follows. The second equality in the first statement is the standard formula for $ V(B_{1}^{k})$ which we won't prove now; for the original statement, only the area of a unit circle is needed, which is very well known to be $ \pi$.