Methods for evaluating $\sum_{n=1}^\infty \frac1{a+(n-1)n}$ I am interested in methods for evaluating the sum $$\sum_{n=1}^\infty \frac1{a+(n-1)n}.$$
Indeed I will give my own answer below using the Residue Theorem.
Please feel free to post other methods for the evaluation, such as Maclaurin series, methods from harmonic/fourier analysis, ...
Related question: Continuity of $f(x) = \sum_{n=0}^{\infty} \frac{1}{n(n+1)+x}$.
 A: Define $$f:\mathbb C\setminus S\to\mathbb C, z\mapsto \frac{1}{a+(z-1)z},$$
where $$S=\left\{\frac{1}{2} \left(1-\rho(a)\right),\frac{1}{2} \left(1+\rho(a)\right)\right\}$$ is the set of poles of $f$. I have defined $\rho(a)=\sqrt{1-4a}$ for $a\in\mathbb C\setminus\{0,\frac14\}$. (Here I am using the Principal square root.)
Indeed, $f$ is analytic on its domain. Also, $f$ satisfies $|f(z)|<\frac{2}{|z|^2}$ if $|z|$ is large enough. We can thus apply the summation Theorem (see Theorem 3.2):
$$\sum_{n=-\infty}^\infty f(n)=-\pi\big(\operatorname{Res}_{z=\frac{1}{2}(1+\rho(a))}(\cot(\pi z) f(z))+\operatorname{Res}_{z=\frac{1}{2}(1-\rho(a))}(\cot(\pi z) f(z)\big).$$
Since both poles are simple, we obtain $$\operatorname{Res}_{z=\frac{1}{2}(1+\rho(a))}(\cot(\pi z) f(z))=\lim_{z\to\frac{1}{2}(1+\rho(a))}\frac{\cot(\pi z)}{z-\frac12(1-\rho(a))}=\frac{\cot \left(\frac{\pi}{2}  \left(\rho(a)+1\right)\right)}{\rho(a)}$$ and similarly $$\operatorname{Res}_{z=\frac{1}{2}(1-\rho(a))}(\cot(\pi z) f(z))=\frac{\cot \left(\frac{\pi}{2}\left(\rho(a)-1\right)\right)}{\rho(a)}.$$ By the shift formula it follows that both residues equal $$-\frac{\tan\left(\frac{\pi \rho(a)}2\right)}{\rho(a)}$$ and hence $$\bbox[15px,border:1px groove navy]{\sum_{n=-\infty}^\infty f(n)=2\frac{\pi  \tan \left(\frac{1}{2} \pi  \rho(a)\right)}{\rho(a)}=2\frac{\pi  \tan \left(\frac{1}{2} \pi  \sqrt{1-4 a}\right)}{\sqrt{1-4 a}}.}$$ From the properties of $f$, in particular $f(-n)=f(n+1)$, we can deduce that $$\bbox[15px,border:1px groove navy]{\sum_{n=1}^\infty f(n)=\frac{\pi  \tan \left(\frac{1}{2} \pi  \sqrt{1-4 a}\right)}{\sqrt{1-4 a}}.}$$
Some remarks.

*

*For $a=0$ the sum and my closed form are undefined, but if you start with $n=2$ then telescoping can easily be used.

*For $a=\frac14$ the last expression is undefined, however we can take the limit as $a\to\frac14$ (it is left as an exercise to the reader to justify this using for example the dominated convergence Theorem) to obtain the very nice result $$\bbox[5px,border:2px solid #C0A000]{\sum_{n=1}^\infty\frac{1}{\frac14+n(n-1)}=\frac{\pi^2}2.}$$

*Even if $a>\frac14$, the last expression will turn out to be a real number since $\tan(ix)=i\tanh(x)$.

A: Let $s$ and $t$ to be the roots of $n^2-n+a=0$. So
$$\frac{1}{a+n(n-1)}=\frac{1}{(n-s)(n-t)}=\frac{1}{s-t}\left(\frac 1{n-s}-\frac 1{n-t}  \right)$$ Recalling that
$$\sum_{n-1}^p \frac 1{n-x}=\psi(p-x+1)-\psi (1-x)$$ we have that, if
$$S={\sqrt{1-4 a}}\sum_{n-1}^p \frac{1}{a+n(n-1)}$$
$$S=\psi \left(\frac{1}{2}+\frac{1}{2} \sqrt{1-4 a}\right)-\psi
   \left(\frac{1}{2}-\frac{1}{2} \sqrt{1-4 a}\right)+$$ $$\psi \left(p+\frac{1}{2}-\frac{1}{2} \sqrt{1-4 a}\right)-\psi \left(p+\frac{1}{2}+\frac{1}{2} \sqrt{1-4 a}\right)$$ Now, using the reflection formula for the digamma function
$$\psi \left(\frac{1}{2}+\frac{1}{2} \sqrt{1-4 a}\right)-\psi
   \left(\frac{1}{2}-\frac{1}{2} \sqrt{1-4 a}\right)=\pi  \tan \left(\frac{1}{2} \pi  \sqrt{1-4 a}\right)$$ Expanding the remaining terms as series for large values of $p$, then
$$\sum_{n-1}^p \frac{1}{a+n(n-1)}=\frac {\pi  \tan \left(\frac{1}{2} \pi  \sqrt{1-4 a}\right) } {\sqrt{1-4 a}}-\frac{1}{p}+\frac{a}{3 p^3}+O\left(\frac{1}{p^5}\right)$$
A: This proof depends on the elementary identity
$$ \prod_{n=1}^m a+n(n-1) = (1-q)_m (q)_m \quad , \quad q=\frac{1}{2}(1+\sqrt{1-4a})) $$
where the symbol $(q)_m$ is the Pochhammer symbol, $(q)_m=\Gamma(q+m)/\Gamma(a).$  (To prove it, factor the polynomial within the product.)  Take the logarithmic derivative with respect to $a$ of the left-hand side,
$$ \frac{d}{da} \log\Big(\prod_{n=1}^m a+n(n-1) \Big) = \sum_{n=1}^m\frac{1}{a+n(n-1)}$$
Do the same to the right-hand side and take $m \to \infty.$  I'm too lazy to do the work and typeset it, so I'll show the Mathematica code:
$$\text{Limit[ D[ Log[ Product[ a+n(n-1),{n,1,m}]], a], m->Infinity] }$$
The answer, of course is the same as above,
 $$\sum_{n=1}^m\frac{1}{a+n(n-1)} = \frac{\pi}{\sqrt{1-4a}} \tan( \frac{\pi}{2} \sqrt{1-4a} )$$
If you do the work by hand, you'll probably need the dilogarithm reflection formula, and asymptotics of the dilogarithm and gamma function.
