This is a curiosity question:
Question Given two positive integers $a$ and $b$ do we have the following equivalence: $$\sum_{n=0}^{\infty}\frac{1}{n^2+2an+b}\in \Bbb Q \iff \exists k\in \Bbb N^+\text{ such that } a^2-b=k^2\ ?$$
My attempt
- $(\Leftarrow)$ Assume that $a^2-b=k^2$ ave $k>0$ then : $$\begin{align}\sum_{n=0}^{\infty}\frac{1}{n^2+2an+b}&=\sum_{n=0}^{\infty}\frac{1}{(n+a)^2-k^2}\\ \\ &=\frac{1}{2k}\sum_{n=0}^{\infty}\left(\frac{1}{n+a-k}-\frac{1}{n+a+k}\right)\\ \\ &=\frac{1}{2k}\sum_{i=0}^{2k-1}\frac{1}{i+a-k} \end{align}$$
- $(\Rightarrow)$ I don't know how to approach this implication, but I know for example that if $a^2-b=0$ then using the sum: $$\sum_{n=0}^{\infty}\frac{1}{(n+a)^2}=\frac{\pi^2}{6}-\sum_{i=1}^{a-1}\frac{1}{i^2}\notin \Bbb Q $$
How can I approach the second implication, I don't know even if it's true or not but it seems when $\sqrt{a^2-b}\in \Bbb N$ that the implication would be true, for instance I don't know what would be the value of: $$\sum_{i=0}^\infty\frac{1}{(n-a)^2+3} \text{ or } \sum_{i=0}^\infty \frac{1}{(n-a)^2-3}.$$
We have $$\sum \frac{1}{n^2+2an+b}=\sum\frac{1}{(n+a)^2+b-a^2}$$
We can assume that the sum is $$\sum\frac{1}{n^2+k}$$ where $k$ is not a square.
For $k$ not a square this sum is linearly dependent of $1$ and $$\sqrt{k}\pi\cosh(\sqrt{k}\pi)$$ or $$\sqrt{k}\pi\cot(\sqrt{k}\pi)$$ over the rationals.
I am not sure if it is known if $e^{\sqrt{k}\pi}$ or $e^{i\sqrt{k}\pi}$ is rational.