Find all real values of $a$ such that $\sum_{n=0}^{\infty} \sin(\pi\sqrt{a^2+n^2})$ diverges To find all $a$ that makes the series diverge, it is sufficient to make the limit of $\sin(\pi\sqrt{a^2+n^2})$ not exist or exists but not  equal to $0$ as $n\to\infty.$
I suspect only $a=0$ would converge the series, and the limit of $\sin(\pi\sqrt{a^2+n^2})$ would not even exist if $a\neq 0.$ .
 A: HINT:
Observe that we can write
$$\begin{align}
\sin(\pi\sqrt{a^2+n^2})&=\sin\left(n\pi\sqrt{1+\frac{a^2}{n^2}}\right)\\\\
&=\sin\left(n\pi+\frac{a^2\pi}{2n}+O\left(\frac1{n^3}\right)\right)\\\\
&=(-1)^n\sin\left(\frac{a^2\pi}{2n}+O\left(\frac1{n^3}\right)\right)
\end{align}$$
Can you finish now?  Is there any real value for $a$ for which this series diverges?
A: Starting like Mark Viola  we have to consider the sum
$$s = \sum _{n=1}^{\infty } \cos (\pi  n) \sin \left(\frac{\pi  a^2}{2 n}\right)$$
Now, expanding the $\sin()$ and exchanging the order of the summation gives under the k-sum:
$$\frac{(-1)^k \left(\frac{\pi  a^2}{2}\right)^{2 k+1} \sum _{n=1}^{\infty } \left(\frac{1}{n}\right)^{2 k+1} \cos (\pi  n)}{(2 k+1)!}$$
Doing the n-sum gives for the k-sum:
$$\sum _{k=0}^{\infty } \frac{(-1)^{k+1} 2^{-4 k-1} \left(2^{2 k}-1\right) \pi ^{2 k+1} \left(a^2\right)^{2 k+1} \zeta (2 k+1)}{(2 k+1)!}$$
Doing the k-sum, neglecting the difference betwenn $\zeta$ and unity leads to
$$\sum _{k=0}^{\infty } \frac{(-1)^{k+1} 2^{-4 k-1} \left(2^{2 k}-1\right) \pi ^{2 k+1} \left(a^2\right)^{2 k+1}}{(2 k+1)!} $$
which is explicitly
$$2 \sin \left(\frac{\pi  a^2}{4}\right)-\sin \left(\frac{\pi  a^2}{2}\right)$$
Hence, contrary to the "guess" in my comment there is no restrictin on "a" for convergence.
