Series of reciprocals of a quadratic polynomial Inspired by this question I was wondering if there is a systematic way to calculate this types of series, so my question is:

Is there a general approach to evaluate (i.e., find a closed formula) the sum $\displaystyle\sum_{n \geq 0} \frac{1}{p(n)}$, where $p(n)=n^2+an+b$? (we skip the terms of the sum in which the denominator vanishes)

Thank you in advance!
 A: Okay, in answer to the query about the doubly infinite version in the comments, we can show that
$$ \pi \cot{\pi z} = \frac{1}{z} + \sum_{n=1}^{\infty} \left( \frac{1}{n+z} - \frac{1}{n-z} \right) $$
(I gave a Fourier series proof of it in this answer, for example). Notice that adding two of these and changing the index on the sum on one allows us to write
$$ 2\pi \cot{\pi z} = \sum_{n=-\infty}^{\infty} \left( \frac{1}{n+z} - \frac{1}{n-z} \right) $$
Now, let's write your sum in a more convenient form: we can complete the square to reduce it to
$$ \sum_{n=-\infty}^{\infty} \frac{1}{(n+\alpha)^2-\beta^2}, $$
where $2\alpha = a$ and $-\beta^2 = b-a^2$. Now, using partial fractions produces
$$ \frac{1}{(n+\alpha)^2-\beta^2} = \frac{1}{2\beta} \left( \frac{1}{n+\alpha-\beta} - \frac{1}{n+\alpha+\beta} \right) $$
This is quite close to the cotangent formula above. Can we come up with some trick to join them together? Well, first consider reindexing the sum in the other direction: this gives us
$$ \sum_{n=-\infty}^{\infty} \left( \frac{1}{n+\alpha-\beta} - \frac{1}{n+\alpha+\beta} \right) = \sum_{n=-\infty}^{\infty} \left( -\frac{1}{n-\alpha+\beta} + \frac{1}{n-\alpha-\beta} \right) \tag{1} $$
Now consider
$$ 2\pi \cot{(\alpha-\beta)\pi}-2\pi \cot{(\alpha+\beta)\pi}, $$
which expands to
$$ \sum_{n = -\infty}^{\infty} \left( \frac{1}{n+\alpha-\beta}-\frac{1}{n-\alpha+\beta} - \frac{1}{-n+\alpha+\beta} + \frac{1}{-n-\alpha-\beta} \right), $$
where the second sum in the combination is is, because of the $-n$, done in the opposite direction, which obviously cannot change its value. The bracket is equal to
$$ \frac{1}{n+\alpha-\beta}-\frac{1}{n-\alpha+\beta} + \frac{1}{n-\alpha-\beta} - \frac{1}{n+\alpha+\beta} $$
But that means that
$$ 2\pi \cot{(\alpha-\beta)\pi}-2\pi \cot{(\alpha+\beta)\pi} = \sum_{n = -\infty}^{\infty} \left( \frac{1}{n+\alpha-\beta} - \frac{1}{n+\alpha+\beta}+ \frac{1}{n-\alpha-\beta}-\frac{1}{n-\alpha+\beta} \right) \\
=2(2\beta)\sum_{n = -\infty}^{\infty} \frac{1}{(n+\alpha)^2-\beta^2},
 $$
by using (1). Hence
$$ \sum_{n = -\infty}^{\infty} \frac{1}{(n+\alpha)^2-\beta^2} = \frac{\pi}{2\beta} \left( \cot{(\alpha-\beta)\pi}- \cot{(\alpha+\beta)\pi}\right) $$
You can write this answer in a neater form by using some trig identities, which gets you down to
$$ \sum_{n = -\infty}^{\infty} \frac{1}{(n+\alpha)^2-\beta^2} = \frac{\pi}{\beta} \frac{\sin{2\beta \pi}}{\cos{2\beta \pi}-\cos{2\alpha \pi}} \tag{2} $$
Okay, now there are two points remaining:


*

*What if $\beta^2<0$? Set $\beta^2=-\gamma^2$; then you can also write
$$\sum_{n = -\infty}^{\infty} \frac{1}{(n+\alpha)^2+\gamma^2} = \frac{\pi}{\gamma} \frac{\sinh{2\gamma \pi}}{\cosh{2\gamma \pi}-\cos{2\alpha \pi}}, $$
which should confirm one's suspicions that there should be no problems with singularities for $\gamma \neq 0$.

*Okay, now what about if it is possible for the denominator to be zero? How do we exclude such a term on the right-hand side of (2)? Make a small perturbation of $\alpha$ to $\alpha+\varepsilon$ for the offending term, subtract this new term it off both sides, and take the limit as $\varepsilon \to 0$, just as you would in finding a derivative or a residue.



Remark: you can also derive this result by contour integration, considering the function
$$ \frac{1}{(z+\alpha)^2-\beta^2}\pi\cot{\pi z} $$
around a large rectangle. I prefer pushing the infinite sums around simply because we can avoid a load of unnecessary theory that way.
