Let $r_{2}(n)$ denote the number of ways in which a positive integer $n$ can be expressed as the sum of squares of two integers. Here the sign as well as order of summands matters. Also by convention we set $r_{2}(0) = 1$. Bruce C. Berndt and George E. Andrews mention the following surprising result of Ramanujan related to $r_{2}(n)$ in their book "Ramanujan's Lost Notebook Vol 4" (page 10): $$\sum_{n = 0}^{\infty}\frac{r_{2}(n)}{\sqrt{n + a}}e^{-2\pi\sqrt{(n + a)b}} = \sum_{n = 0}^{\infty}\frac{r_{2}(n)}{\sqrt{n + b}}e^{-2\pi\sqrt{(n + b)a}}\tag{1}$$ where $a, b$ are positive real numbers.
It is further mentioned that this formula was referred in a paper ("On the expression of a number as the sum of two squares", Quart. J. Math. (Oxford)46(1915), 263–283.) by G. H. Hardy and was not seen anywhere in any of Ramanujan's published/unpublished work.
Like Ramanujan Berndt / Andrews also don't provide the proof in their book. The only detail I know about $r_{2}(n)$ is its generating function $$\sum_{n = 0}^{\infty}r_{2}(n)q^{n} = \vartheta_{3}^{2}(q) = \left(\sum_{n = -\infty}^{\infty}q^{n^{2}}\right)^{2} = 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}}{1 + q^{2n}}\tag{2}$$ (see this post) from which it is possible to find a direct formula for $r_{2}(n)$ based on count of divisors of $n$ of type $(4m + 1)$ and of type $(4m + 3)$. On the other hand the formula $(1)$ seems to based on some formula related to the sum $$\sum r_{2}(n)e^{-2\pi\sqrt{(n + a)b}}$$ and then taking its derivative with respect to $a$ to get $$-b\pi\sum \frac{r_{2}(n)}{\sqrt{(n + a)b}}e^{-2\pi\sqrt{(n + a)b}}$$ But when I try to integrate RHS of $(1)$ with respect to $a$ it leads to nowhere. My guess is that it is difficult to obtain $(1)$ as a derivative of some simpler identity.
Any proof of the formula $(1)$ or any reference containing a proof of $(1)$ is desired.
ramanujan.stackexchange.com
! :-$)$ – Lucian Jul 11 '15 at 13:49