What is the closed-form for $\displaystyle\sum_{m,n = - \infty}^{\infty} \frac{(-1)^m}{m^2 + mn+41n^2}$?

The key here is a result which goes by the name of Kronecker's second limit formula. Using the formulation given in Wikipedia it can be proved that the desired sum in question is equal to $$-\frac{2\pi\log|2g^{4}(q)|} {\sqrt{163}} $$ where $q=\exp(\pi i\tau), 2\tau=1+i\sqrt{163}$ and $$g(q) =2^{-1/4}q^{-1/24}\prod_{n=1}^{\infty}(1-q^{2n-1})$$ With some manipulation it can be shown that the above sum is equal to $$-\frac{\pi\log(2G_{163}^{4})}{\sqrt{163}}$$ The value of $$G_{163}=\frac{6+\sqrt[3]{135-3\sqrt{489}}+\sqrt[3]{135+3\sqrt{489}}} {3\sqrt[4]{2}} $$ is (not so) well known and the calculations explained above can be performed with reasonable amount of labor to obtain a closed form for the sum in question.


It seems we can get an aesthetic summary using Ramanujan's $g_n$ and $G_n$ functions (also via the Weber modular functions) as,

$$ \sum_{p,q = - \infty}^{\infty}\, \frac{(-1)^p}{p^2 + n q^2} = - \frac{\pi \ln{\big(2\,g^4_n\big)}}{\sqrt {n}} $$

$$ \sum_{p,q = - \infty}^{\infty}\, \frac{(-1)^p}{p^2 + pq+ k q^2} = - \frac{\pi \ln{\big(2\,G^4_n\big)}}{\sqrt {n}} $$

where $n=4k-1$ for $G_n$ and,

$$g_n =2^{-1/4}\,\frac{\eta\big(\tfrac12\sqrt{-n}\big)}{\eta\big(\sqrt{-n}\big)}$$ and, $$G_n = 2^{-1/4}\,\frac{\eta^2\big(\sqrt{-n}\big)}{\eta\big(\tfrac12\sqrt{-n}\big)\,\eta\big(2\sqrt{-n}\big)}$$

with Dedekind eta function $\eta(\tau)$.


For example,

$$g_{58} = \sqrt{\frac{5+\sqrt{29}}2} =2.27872\dots $$ $$G_{163} = 2^{-1/4}x =4.47241\dots$$ with $x$ as the real root of $x^3-6x^2+x-2=0$. Incidentally,

$$e^{\pi\sqrt{163}}\approx x^{24}-24.00000000000000105\dots$$