For any positive integer $n$, let $S_n$ denote the number of solutions to the equation $x^2+y^2=n$, where $(x,y)\in\mathbb{N}^2$.
How to evaluate $\displaystyle\sum_{n=1}^\infty\frac{(-1)^nS_n}{n}$ ?
Note that the sum can be written as $\displaystyle\sum_{x=1}^\infty\sum_{y=1}^\infty\frac{(-1)^{x+y}}{x^2+y^2}$.
Thanks for help.
The ring of Gaussian integers $\mathbb{Z}[i]$ is an Euclidean domain, hence a UFD. It follows that $$ r_2(n) = \left|\{(a,b)\in\mathbb{Z}^2:a^2+b^2=n\}\right| $$ is a multiple of a multiplicative function: $$ r_2(n) = 4\left(\chi_4*1\right)(n) = 4\sum_{d\mid n}\chi_4(d) $$ where $\chi_4(d)$ equals $1$ iff $d\equiv 1\pmod{4}$, $-1$ iff $d\equiv 3\pmod{4}$ and zero otherwise.
If $n\in\mathbb{N}^+$ is not a square we have $S_n=(\chi_4*1)(n)$, if $n$ is a square we have $S_n=(\chi_4*1)(n)+1$.
By Gauss circle problem the average value of $S_n$ is $\frac{\pi}{4}$; the series $\sum_{n\geq 1}\frac{(-1)^n S_n}{n}$ is conditionally convergent and $$ \sum_{n\geq 1}\frac{(-1)^n S_n}{n} = \sum_{n\geq 1}\frac{(-1)^n (\chi_4*1)(n)}{n}+\sum_{n\geq 1}\frac{(-1)^{n^2}}{n^2} = \sum_{n\geq 1}\frac{(-1)^n (\chi_4*1)(n)}{n}-\frac{\pi^2}{12}. $$ For any $s>1$ we have $$ \sum_{n\geq 1}\frac{(-1)^n (\chi_4*1)(n)}{n^s}=-\sum_{n\geq 1}\frac{(\chi_4*1)(n)}{n^s}+2\sum_{\substack{n\geq 1\\n\text{ even}}}\frac{(\chi_4*1)(n)}{n^s}=\left(-1+\frac{2}{2^s}\right)\zeta(s)L(\chi_4,s) $$ and the limit of the RHS as $s\to 1^+$ is $-\frac{\pi}{4}\log 2$. It follows that $$ \sum_{n\geq 1}\frac{(-1)^n S_n}{n}=-\frac{\pi}{4}\log(2)-\frac{\pi^2}{12}$$ but one is not allowed to rearrange $\sum_{x\geq 1}\sum_{y\geq 1}\frac{(-1)^{x+y}}{x^2+y^2}$ into $\sum_{n\geq 1}\frac{(-1)^n S_n}{n}$ due to the lack of absolute convergence of the double series. On the other hand
$$ \sum_{x\geq 1}\sum_{y\geq 1}\frac{(-1)^{x+y}}{x^2+y^2} = \sum_{x\geq 1}\frac{(-1)^x\left(-1+\frac{\pi x}{\sinh(\pi x)}\right)}{2x^2}=\frac{\pi^2}{24}+\frac{\pi}{2}\sum_{x\geq 1}\frac{(-1)^x}{x\sinh(\pi x)}=\frac{\pi^2}{12}-\frac{\pi}{4}\log(2) $$ can be proved through the Poisson summation formula.