# An interesting sum over lattice points in a large disk centered at the origin

Evaluate the the limit, as $$r \rightarrow \infty$$, of the sum $$\displaystyle \sum \limits_{(m,n) \in D_r}$$ $$\displaystyle (-1)^{m+n} \over \displaystyle m^2 + n^2$$, where $$D_r$$ denotes the closed disk of radius $$r$$ centered at the origin.

I expect one would need Poisson summation to turn this into an exponential sum and apply some analytic estimate, but I cannot find any relevant results. Any help and especially, references, would be welcome.

• Summing on $m$ then on $n$ (or the reverse) gives (numerically) $-\pi\log(2)$. This should be standard. – Henri Cohen Jan 27 '19 at 18:42
• Why would summing each index separately still give the same answer? This should be a conditionally convergent series, so should different orderings not converge to different sums? – KLC Jan 28 '19 at 11:23

It is problem number 10 of IMC 2018, you may find the solution on the official site.

• Too bad, I am not following these math competitions. I added my own (pretty standard) calculation below. – GH from MO Jan 27 '19 at 19:36
• @GHfromMO It is quite interesting (for me) that all the number theory used for example in your solution may be replaced by applying the linear change of variables. By the way, another standard way to calculate this sum compared to the genuine answer gives the nice, of course known, formula $2^{1/4}e^{-\pi/24}=(1+e^{-\pi})(1+e^{-3\pi})(1+e^{-5\pi})\dots$. – Fedor Petrov Jan 27 '19 at 19:48
• Yes, I was also surprised by the elementary nature of the official solution. Of course I like my solution better :-) – GH from MO Jan 27 '19 at 20:11

The limit equals $$-\pi\log 2$$, in accordance with Henri Cohen's remark above.

For the proof, we combine the formula $$r_2(k):=\#\{(m,n)\in\mathbb{Z}^2:m^2+n^2=k\}=4\sum_{d\mid k}\chi_4(d)$$ with Dirichlet's hyperbola method. With this notation, the OP's sum equals $$\sum_{k\leq r^2}\frac{(-1)^kr_2(k)}{k}=4\sum_{de\leq r^2}\frac{(-1)^{e}\chi_4(d)}{de}.$$ We shall now use the well-known facts that $$\sum_{d=1}^\infty\frac{\chi_4(d)}{d}=\frac{\pi}{4} \qquad\text{and}\qquad \sum_{e=1}^\infty\frac{(-1)^e}{e}=-\log 2,$$ where both series are alternating. Using this observation, \begin{align*} \sum_{de\leq r^2}\frac{(-1)^{e}\chi_4(d)}{de} =&\sum_{\substack{d\leq r\\e\leq r^2/d}}\frac{(-1)^{e}\chi_4(d)}{de} +\sum_{\substack{e\leq r\\d\leq r^2/e}}\frac{(-1)^{e}\chi_4(d)}{de}- \sum_{d,e\leq r}\frac{(-1)^{e}\chi_4(d)}{de}\\ =&\sum_{d\leq r}\frac{\chi_4(d)}{d}\left(-\log 2+O\left(\frac{d}{r^2}\right)\right)\\ &+\sum_{e\leq r}\frac{(-1)^e}{e}\left(\frac{\pi}{4}+O\left(\frac{e}{r^2}\right)\right)\\ &-\left(\sum_{d\leq r}\frac{\chi_4(d)}{d}\right) \left(\sum_{e\leq r}\frac{(-1)^e}{e}\right)\\ =&-\log 2\sum_{d\leq r}\frac{\chi_4(d)}{d}+\frac{\pi}{4}\sum_{e\leq r}\frac{(-1)^e}{e}+\frac{\pi}{4}\log 2+O\left(r^{-1}\right)\\ =&-\frac{\pi}{4}\log 2-\frac{\pi}{4}\log 2+\frac{\pi}{4}\log 2+O\left(r^{-1}\right)\\ =&-\frac{\pi}{4}\log 2+O\left(r^{-1}\right). \end{align*} Therefore, the OP's sum is $$\sum_{k\leq r^2}\frac{(-1)^kr_2(k)}{k}=-\pi\log 2+O\left(r^{-1}\right).$$

• I accepted Fedor's answer because that was where the question originated, but this to me was a much clearer way to solve it. Thank you. – KLC Jan 28 '19 at 11:27
• @KevinL: Thanks for the feedback and the kind words. I am glad I could help! – GH from MO Jan 28 '19 at 11:38

More generally, when $$\Re(s)\ge1$$ $$\sum_{(m,n)\ne(0,0)}(-1)^{m+n}/(m^2+n^2)^s=-4(1-2^{1-s})\zeta_K(s)$$ where $$K=\mathbb Q(i)$$ and $$\zeta_K$$ is the Dedekind zeta function of $$K$$.

• So we should find the residue of Dedekind zeta function at 1, and how to do it? – Fedor Petrov Jan 27 '19 at 22:55
• @FedorPetrov: The residue of $\zeta_K(s)$ is standard, it is $L(1,\chi_4)=\pi/4$. On the other hand, justifying the identity in Henri Cohen's response for $\Re(s)=1$ is nontrivial. – GH from MO Jan 27 '19 at 22:57
• @GHfromMO Ah, indeed. The analytical part is also standard: you may partition the summands in LHS onto domino pairs $(m, n)$ and $(m+1,n)$, after that the series becomes pretty regular near $s=1$. – Fedor Petrov Jan 27 '19 at 23:01
• @FedorPetrov: Well, the subtlety is that for $\Re(s)=1$, the value of the LHS depends on the ordering of the terms (in the summation). The series is conditionally convergent, hence one can obtain any value by varying the ordering of the terms. The OP had a specific ordering in mind (at least for $s=1$), namely according to distance from the origin, and for that ordering the identity indeed holds. – GH from MO Jan 27 '19 at 23:05
• @GHfromMO yes, it depends on the ordering, but after the pairing which I suggest it becomes absolutely convergent, and it agrees with the summation over large convex sets like large disc – Fedor Petrov Jan 27 '19 at 23:08

Assuming convergence, here goes:

let $$r_2(k)$$ denote the number of ways a number $$k\in\mathbb{N}$$ can be written as the sum of squares of two integers. Then, we compute $$\sum_{(0,0)\neq(m,n)\in\mathbb{Z}^2}\frac{(-1)^{m+n}}{m^2+n^2}=\sum_{k=1}^{\infty}(-1)^k\frac{r_2(k)}k.$$ It is known that $$r_2(k)=4\sum_{d\vert k}\left(\frac{-4}k\right)=4\left(1*\left(\frac{-4}k\right)\right)(k)$$ where $$\left(\frac{a}b\right)$$ is the Jacobi symbol. Using $$\left(\frac{-4}{2k}\right)=0$$ and $$\left(\frac{-4}{2k+1}\right)=(-1)^k$$ it follows that \begin{align} \sum_{k=1}^{\infty}(-1)^k\frac{r_2(k)}k &=4\sum_{k=1}^{\infty}(-1)^k\frac{(1*\left(\frac{-4}k\right)(k)}k \\ &=4\sum_{n=1}^{\infty}\frac{(-1)^n}n\sum_{k=1}^{\infty}(-1)^k\frac{\left(\frac{-4}k\right)(k)}k \\ &=4\sum_{n=1}^{\infty}\frac{(-1)^n}n\sum_{m=0}^{\infty}\frac{(-1)^m}{2m+1} \\ &=4(-\log(2))\left(\frac{\pi}4\right) \\ &=-\pi\,\log(2), \end{align} which confrims Henri Cohen's guesstimate.