Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to evaluate the sum

$$\sum_{n=0}^\infty \frac{1}{an^2+bn+c}$$

Here is my attempt:



The poles of $f(z)$ are located at

$$z_0 = \frac{-b+\sqrt{b^2-4ac}}{2a}$$


$$z_1 = \frac{-b-\sqrt{b^2-4ac}}{2a}$$


$$ b_0=\operatorname*{Res}_{z=z_0}\,\pi \cot (\pi z)f(z)= \lim_{z \to z_0} \frac{(z-z_0)\pi\cot (\pi z)}{az^2+bz+c}= \lim_{z \to z_0} \frac{\pi\cot (\pi z)+(z_0-z)\pi^2\csc^2 (\pi z)}{2az+b} $$

Using L'Hopital's rule. Continuing, we have the limit is

$$ \lim_{z \to z_0} \frac{\pi\cot (\pi z)+(z_0-z)\pi^2\csc^2 (\pi z)}{2az+b}= \frac{\pi\cot (\pi z_0)}{2az_0+b} $$

For $z_0 \ne 0$

Similarly, we find

$$b_1=\operatorname*{Res}_{z=z_1}\,\pi \cot (\pi z)f(z)=\frac{\pi\cot (\pi z_1)}{2az_1+b}$$


$$\sum_{n=-\infty}^\infty \frac{1}{an^2+bn+c} = -(b_0+b_1)=\\ -\pi\left( \frac{\cot (\pi z_0)}{2az_0+b} + \frac{\cot (\pi z_1)}{2az_1+b}\right)= -\pi\left( \frac{\cot (\pi z_0)}{\sqrt{b^2-4ac}} + \frac{\cot (\pi z_1)}{-\sqrt{b^2-4ac}}\right)= \frac{-\pi(\cot (\pi z_0)-\cot (\pi z_1))}{\sqrt{b^2-4ac}}= \frac{\pi(\cot (\pi z_1)-\cot (\pi z_0))}{\sqrt{b^2-4ac}} $$

Then we have

$$\sum_{n=0}^\infty \frac{1}{an^2+bn+c} = \frac{\pi(\cot (\pi z_1)-\cot (\pi z_0))}{2\sqrt{b^2-4ac}}$$

Is this correct? I feel like I made a mistake somewhere. Could someone correct me? Is there an easier way to evaluate this sum?

share|cite|improve this question
As mentioned below you will need to sum from $-\infty$ to $\infty$ in order for your formula to work. As an alternative you could derive a similar looking formula for your original series by using the digamma function $\psi(z)$ instead of $\pi \cot(\pi z)$. – newguy Jun 21 '12 at 17:13
up vote 11 down vote accepted

This is almost correct, but I believe the original sum needs to range from $-\infty$ to $\infty$ instead of $0$ to $\infty$. The solution that follows considers the sum $\sum_{n=-\infty}^\infty \frac{1}{an^2+bn+c}$, and throughout I will write $\sum_{n=-\infty}^\infty f(n)$ to mean $\lim_{N\rightarrow \infty}\sum_{n=-N}^N f(n)$.

Factoring the quadratic, with your definition of $z_{0},\ z_{1}$, we have $$\sum_{n=-\infty}^\infty \frac{1}{an^2+bn+c}=\frac{1}{a}\sum_{n=-\infty}^{\infty}\frac{1}{\left(n-z_{0}\right)\left(n-z_{1}\right)}.$$ Assume that neither $z_0$ nor $z_1$ are integers, since otherwise we would have a $\frac{1}{0}$ term appearing in the sum. By applying partial fractions, remembering that $z_{0}-z_{1}=\frac{\sqrt{b^{2}-4ac}}{a}$ we get $$\frac{1}{\sqrt{b^{2}-4ac}}\sum_{n=-\infty}^{\infty}\left(\frac{1}{n-z_{0}}-\frac{1}{n-z_{1}}\right).$$ By the cotangent identity $\pi\cot\left(\pi x\right)=\sum_{n=-\infty}^{\infty}\frac{1}{n+x},$ we conclude that $$\sum_{n=-\infty}^\infty \frac{1}{an^2+bn+c}=\frac{\pi\cot\left(\pi z_{1}\right)-\pi\cot\left(\pi z_{0}\right)}{\sqrt{b^{2}-4ac}}.$$

share|cite|improve this answer
Thanks! So just my last step (when I cut the sum so it was from 0 to $\infty$ instead of $-\infty$ to $\infty$) was wrong. – Argon Jun 21 '12 at 17:11
We can still get a value when $z_0$ or $z_1$ are integers, the sum just omits the 1/0 terms. The residue calculation is simply a bit different in this case. It appears Argon was using a method I outline here. – Ragib Zaman Jun 21 '12 at 17:21
Wow, I thought I knew math! I'm lost at the point where cot() function appeared. Is there a Wikipedia page explaining the introduction of the $\pi\cot\left(\pi x\right)$ term? – hkBattousai Jun 21 '12 at 21:08
It seems that you only consider the case $b^2-4ac>0$ with $z_0$ and $z_1$ non integers. How do you treat the case when $z_0$ or $z_1$ is an integer, and the case $b^2-4ac \le 0$? – Mercy King Jun 22 '12 at 11:38
@Mercy: This case will be different, as then $z_1=z_0$, and we are looking at $$f(z)=\sum_{n=-\infty}^\infty \frac{1}{(n+z)^2},$$ when $z=-z_1$. Taking the derivative of the series for $\pi \cot(\pi z)$, and being extremely careful about the rules regarding switching the differentiation operation with the order of a series, we get that the above is $$f(z)=-\frac{d}{dz} \pi \cot(\pi z)=\pi^2 \csc^2(\pi z),$$ so that $$\sum_{n=-\infty}^{\infty} \frac{1}{an^2+bn+c}=\frac{\pi^2\csc^2(\pi z_0)}{a}.$$ – Eric Naslund Jun 22 '12 at 12:57

Take $a=1,\ b=3, \ c=2$, then $z_0=-2, \ z_1=-1$, and so you have to compute $\cot(-\pi)$ and $\cot(-2\pi)$ which make no sense. However $$ \sum_{n=0}^\infty\frac{1}{n^2+3n+2}=\sum_{n=0}^\infty(\frac{1}{n+1}-\frac{1}{n+2}) =\lim_{m\to \infty}(1-\frac{1}{m+2})=1. $$

share|cite|improve this answer

Here is my answer in terms of the digamma function (cf. Abramowitz and Stegun). Using the decomposed version of the sum given by Eric Naslund♦, we find:

$$\sum_{n=0}^\infty \frac{1}{an^2+bn+c}= \frac{1}{\sqrt{b^{2}-4ac}}\sum_{n=0}^{\infty}\left(\frac{1}{n-z_{0}}-\frac{1}{n-z_{1}}\right)= \frac{\psi (-z_0)-\psi(-z_1)}{\sqrt{b^{2}-4ac}} $$

I note that this answer is in fact quite similar to the sum's closed form from $-\infty$ to $\infty$.

Here is an alternate solution:

$$\sum_{n=0}^\infty \frac{1}{an^2+bn+c}= \frac{1}{a}\sum_{n=0}^\infty \frac{1}{(n-z_0)(n-z_1)} $$

If $c_n$ is the $n^{th}$ term of the second version, then


which shows that this sum can be written as a hypergeometric function

$$ \frac{1}{a}\sum_{n=0}^\infty \frac{1}{(n-z_0)(n-z_1)}= \frac{1}{az_0z_1}\sum_{n=0}^\infty \frac{\Gamma(n-z_0)\Gamma(n-z_1)n!}{\Gamma(n-z_0+1)\Gamma(n-z_1+1)n!}= \frac{1}{z_0z_1a}{_3}F_2(-z_0, -z_1, 1;1-z_0, 1-z_1;1) $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.