# Evaluate $\sum _{n=1}^{\infty } \sin \left(\pi \sqrt{n^2+1}\right)$

How can one prove $$\sum _{n=1}^{\infty } \sin \left(\pi \sqrt{n^2+1}\right)=-\frac{1}{2}\pi Y_1(\pi )-\int_0^{\infty } \exp ^{\frac{\pi}{2} \left(t-t^{-1}\right)} (\theta(2 \pi t)-1) \, dt$$ Here $$\theta$$ denotes Theta function of the third kind. Correpsonding cosine case is solved here but not so helpful. Any help will be appreciated.

• $\sin(\pi\sqrt{n^2+1}-\pi n) = \sin(\pi\frac{1}{\sqrt{n^2+1}+n}) \sim \frac{\pi}{2n}$, so doesn't sum diverge? – mathworker21 Sep 29 '19 at 15:24
• @mathworker21: it converges because the sign of $\sin(\pi n+\varepsilon)$ depends on the parity of $n$. – Jack D'Aurizio Sep 29 '19 at 15:29
• @mathworker21: Sorry, the correct form of the comment is as given by Jack D'Aurizo. – John Bentin Sep 29 '19 at 16:05

We can use the Poisson summation formula after a transformation to obtain the quoted result. Defining $$$$I(a)=\sum _{n=1}^{\infty } \sin \left(\pi \sqrt{n^2+a^2}\right)$$$$ we have $$$$I'(a)=\pi a\sum _{n=1}^{\infty } \frac{\cos \left(\pi \sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}}$$$$ For even functions, the Poisson summation formula reads $$$$\sum _{n=1}^{\infty }f(n)=\sum _{k=1}^{\infty }\hat f(k)+\frac{1}{2}\left( \hat f(0)-f(0) \right)$$$$ where $$$$\hat f(k)=2\int_0^\infty f(t)\cos(2\pi kt)\,dt$$$$ Using the tabulated integral (3.876.2) in G&R, with $$a>0$$, $$$$\int_0^\infty \frac{\cos \left(\pi \sqrt{t^2+a^2}\right)}{\sqrt{t^2+a^2}}\cos(2\pi kt)\,dt= \begin{cases} K_0\left( \pi a\sqrt{4k^2-1} \right) & \text{for } k>1/4\\ -\frac{\pi}{2}Y_0\left(\pi a \right) & \text{for } k<1/4 \end{cases}$$$$ Then $$$$I'(a)=2\pi a\sum _{k=1}^{\infty } K_0\left( \pi a\sqrt{4k^2-1} \right) -\frac{\pi^2 a}{2}Y_0\left(\pi a \right)-\frac{\pi}{2}\cos \pi a$$$$ From here, noticing that $$I(0)=0$$, we can integrate by exchanging summation and integration \begin{align} I(s)&=2\pi \sum _{k=1}^{\infty }\int_0^s K_0\left( \pi a\sqrt{4k^2-1} \right)a\,da -\frac{\pi^2}{2}\int_0^s Y_0\left(\pi a \right)a\,da-\frac{\pi}{2}\int_0^s \cos \pi a\,da\\ &=-2s\sum _{k=1}^{\infty }\frac{K_1\left( \pi s\sqrt{4k^2-1} \right)}{\sqrt{4k^2-1}}-\frac{\pi}{2}sY_1\left( \pi s \right)-\frac{1}{2}\sin \pi s \end{align} We chose an integral representation for the Bessel function DLMF $$$$K_{1}\left(z\right)=\frac{z}{4}\int_{0}^{\infty}\exp \left(-t-\frac{z^{2}}{4t}\right)\frac{\mathrm{d}t}{t^2}$$$$ The above series reads \begin{align} -2s\sum _{k=1}^{\infty }\frac{K_1\left( \pi s\sqrt{4k^2-1} \right)}{\sqrt{4k^2-1}}&=-\frac{\pi s}{2}\sum _{k=1}^{\infty }\int_0^\infty e^{-t+\frac{\pi^2s^2}{4t}-\frac{\pi^2s^2k^2}{t}}\frac{\mathrm{d}t}{t^2}\\ &=-\frac{\pi s^2}{2}\int_0^\infty e^{-t+\frac{\pi^2s^2}{4t}}\left( \sum _{k=1}^{\infty }e^{-\frac{\pi^2s^2k^2}{t}} \right)\frac{\mathrm{d}t}{t^2}\\ &=-\frac{\pi s^2}{4}\int_0^\infty e^{-t+\frac{\pi^2s^2}{4t}}\left( f\left(\frac{\pi^2s^2}{t} \right)-1 \right)\frac{\mathrm{d}t}{t^2}\\ &=-\frac{s^3}{2}\int_0^\infty e^{\frac{\pi s}{2}\left( u-\frac{ 1}{u} \right)}\left(f\left( 2\pi su \right)-1 \right)\mathrm{d}u \end{align} Where $$f(\pi^2 a^2/t)=\theta_3(0,e^{-\pi^2 a^2/t})$$ where $$\theta_3$$ is the Theta function of the third kind DLMF. The latter expression was obtained by changing $$t=\pi s/(2u)$$.
Finally, $$$$\sum _{n=1}^{\infty } \sin \left(\pi \sqrt{n^2+s^2}\right)=-\frac{s^3}{2}\int_0^\infty e^{\frac{\pi s}{2}\left( u-\frac{ 1}{u} \right)}\left(f\left( 2\pi su \right)-1 \right)\mathrm{d}u-\frac{\pi}{2}sY_1\left( \pi s \right)-\frac{1}{2}\sin \pi s$$$$ which seems to be numerically correct.
• Ingenious to differentiate w.r.t $a$ and using Poisson formula! I didn't come up with this to find the connection between the original one and the Macdonald-K series. In fact, this problem, together with some I already posted before (which you also discussed/answered), come from the same part of a blog which treats applications on Bessel variations. – Iridescent Oct 11 '19 at 3:32
Let's see: $$\sin\left(\pi\sqrt{n^2+1}\right)=\sin\left(\pi n+\frac{\pi}{n+\sqrt{n^2+1}}\right)=(-1)^n\sin\left(\frac{\pi}{n+\sqrt{n^2+1}}\right)$$ hence the series is convergent by Leibniz' test. The collateral series $$S(m)=\sum_{n\geq 1}(-1)^n\left(\frac{1}{n+\sqrt{n^2+1}}\right)^{2m+1}$$ are interesting objects, related to some series due to Ramanujan. By the (inverse) Laplace transform $$S(0)=\sum_{n\geq 1}\frac{(-1)^n}{n+\sqrt{n^2+1}}=\int_{0}^{+\infty}\frac{J_1(s)}{s}\sum_{n\geq 1}(-1)^n e^{-ns}\,ds=-\int_{0}^{+\infty}\frac{J_1(s)}{s(e^s+1)}\,ds$$ and by the integral representation for the Bessel function $$J_1$$ $$\frac{J_1(s)}{s}=\frac{1}{\pi}\int_{0}^{\pi}\cos(s\cos\theta)\sin^2(\theta)\,d\theta$$ such that $$S(0) = -\frac{1}{2\pi}\cdot\Re\int_{0}^{\pi}\psi\left(\frac{2+i\cos\theta}{2}\right)-\psi\left(\frac{1+i\cos\theta}{2}\right)\,d\theta.$$ These real parts of digamma functions are extremely well-behaved on $$[0,\pi]$$, hence any numerical integration algorithm is able to find $$S(0)\approx -0.271597$$ with arbitrary accuracy. The same approach can be applied to $$S(1),S(2),\ldots$$ and the sequence $$\{S(n)\}_{n\geq 0}$$ roughly converges to zero like $$\frac{1}{(1+\sqrt{2})^{2n}}$$, so it is sufficient to compute $$S(n)$$ up to a small $$n$$ with good accuracy, then invoke interpolation to approximate $$\sum_{n\geq 1}\sin(\pi\sqrt{n^2+1})=\sum_{m\geq 0}\frac{\pi^{2m+1}(-1)^m}{(2m+1)!}S(m)\approx \color{red}{-0.566582}.$$