I am trying to approximate the following series on the euclidean grid where $\sqrt{i^2 + j^2}$ in the exponent comes from distances on the euclidean grid from the origin.
$x = \sum_{i,j \geq 0} e^{-a \sqrt{i^2 + j^2}} \text{, where } i,j \in\mathbb{Z}^2 $
This is a followup to my question before with an additional constant $a$ in exponent: Closed form sum for the following series on the euclidean grid..
The answer to the post suggests a close approximation as $\sum_{n=1}^{N^2}(\chi_4*1)(n) e^{-a\sqrt{n}}$, where $n = a^2+b^2 ,(a,b)\in\mathbb{Z}^2$. I calculate $e^{-a\sqrt{n}}$ (now with the constant $a$) as an easy consequence of the Gaussian integral as
$$ e^{-a\sqrt{n}}=\frac{2}{\sqrt{\pi}}\int_{0}^{+\infty}e^{-s^2}e^{-a^2n/4s^2}\,ds = \frac{1}{\sqrt{\pi}}\int_{0}^{+\infty}e^{-1/4s^2}e^{-a^2ns^2}\,\frac{ds}{s^{2}} $$ and by substituting $t \triangleq as$ $$=\frac{a}{\sqrt{\pi}}\int_{0}^{+\infty}e^{-a^2/4t^2}e^{-nt^2}\,\frac{dt}{t^{2}} $$
I have trouble working out the next steps to finally arrive at $\sum_{i,j\geq 0}e^{-a\sqrt{i^2+j^2}}$. Since I am not familiar with the Jacobi Theta function or its functional identity. I am not quite sure how he worked out the following (without constant $a$ here): $$\sum_{i,j\geq 0}e^{-\sqrt{i^2+j^2}}=\sum_{n=1}^{N^2}(\chi_4*1)(n) e^{-\sqrt{n}}=\frac{1}{\sqrt{\pi}}\int_{0}^{+\infty}\Theta^2(e^{-s^2}) e^{-\frac{1}{4s^2}}\frac{ds}{s^{2}}\label{a}\tag{1}$$ I tried and got stuck evaluating $ \sum_{n=1}^{N^2}(\chi_4*1)(n) e^{-a\sqrt{n}}$ as $$ \sum_{i,j\geq 0}e^{-a\sqrt{i^2+j^2}}=\frac{a}{\sqrt{\pi}}\int_{0}^{+\infty} \sum_{n=1}^{N^2} e^{-nt^2} (\chi_4*1)(n) e^{-a^2/4t^2}\frac{ds}{s^{2}} $$
I am looking for help in working out the problem further to a state I can efficiently compute. Which numerical integration algorithms would be best suited to give the desired approximation? Perhaps which software suit you could use for this problem and how to integrate over the square of the jacobi theta function in \ref{a}. I fed the equation in Mathematica using this function and could not get the correct result.