<s>[INST] How to evaluate infinite series $\sum\limits_{n=0}^\infty\sqrt{B^2+n^2} e^{-an}$ I'm trying to evaluate an infinite series:
$$
\sum\limits_{n=0}^\infty\sqrt{B^2+n^2} e^{-an}
$$
where $a$ and $B$ are real parameters, or equivalently:
$$\sum\limits_{n=0}^\infty\sqrt{B^2+n^2} x^n$$
where $0<x<1$.
When $n$ becomes much larger than $B$, the terms will begin to look like:
$$nx^n$$
If the entire sum were comprised of these, there's a closed analytic form, which I think is: 
$$\sum\limits_{n=0}^\infty n x^n = \frac{x}{(1-x)^2}$$
It would be great to know the sum in the first line in closed form though. If anyone could assist either with a closed analytic expression, or even just ideas or techniques as to how to go about evaluating this, It'd be much appreciated.
 [/INST] This series can not be evaluated directly. One approximation method is as follows. Let the Lerch transcendent be defined by
$$ \phi(z;s,\alpha) = \sum_{n=0}^{\infty} \frac{z^{n}}{(n+\alpha)^{s}}.$$
The series expansion of $\sqrt{1+x}$ is, for the first few terms,
$$\sqrt{1+x} = 1 + \frac{x}{2} - \frac{x^{2}}{8}+ \frac{3 \, x^{3}}{16} - \cdots. $$
and leads to
\begin{align}
S &= \sum_{n=0}^{\infty} \sqrt{b^{2}+n^{2}} \, e^{-an} = \sqrt{b^{2}} + \sum_{n=1}^{\infty} n \, \sqrt{1 + \frac{b^{2}}{n^{2}}} \, e^{-an} \\
&= \sqrt{b^{2}} + \sum_{n=1}^{\infty} n \, e^{-an} \, \left( 1 + \frac{b^{2}}{2 \, n^{2}} - \frac{b^{4}}{8 \, n^{4}} + \frac{3 \, b^{6}}{16 \,n^{6}} - \cdots \right) \\
&= \sqrt{b^{2}} - \frac{d}{da} \, \left( \frac{e^{-a}}{1 - e^{-a}} \right) + \frac{b^{2}}{2} \, \sum_{n=1}^{\infty} \frac{e^{-an}}{n} - \frac{b^{4}}{8} \, \sum_{n=0}^{\infty} \frac{e^{-a(n+1)}}{(n+1)^{3}} + \frac{3 \, b^{6}}{16} \, \sum_{n=0}^{\infty} \frac{e^{-a(n+1)}}{(n+1)^{5}} - \cdots \\
&= \sqrt{b^{2}} - \frac{d}{da} \, \left( \frac{1}{e^{a} - 1} \right) - \frac{b^{2}}{2} \, \ln(1-e^{-a}) - \frac{b^{4} \, e^{-a}}{8} \, \phi(e^{-a}; 3,1) + \frac{3 \, b^{6} \, e^{-a}}{16} \, \phi(e^{-a}; 5,1) - \cdots  \\
&= \sqrt{b^{2}} + \frac{e^{a}}{(e^{a}-1)^{2}} - \frac{b^{2}}{2} \, \ln(1 - e^{-a}) - \frac{b^{4} \, e^{-a}}{8} \, \phi(e^{-a}; 3,1) + \frac{3 \, b^{6} \, e^{-a}}{16} \, \phi(e^{-a}; 5, 1) - \cdots
\end{align}

By using 
$$\sqrt{1+x} = \sum_{r=0}^{\infty} \frac{(-1)^{r} \, \left(- \frac{1}{2}\right)_{r}}{r!} \, x^{r},$$
where $(x)_{n}$ is the Pochhammer symbol, then
\begin{align}
S &= \sum_{n=0}^{\infty} \sqrt{b^{2} + n^{2}} \, e^{-an} = \sqrt{b^{2}} + \sum_{n=1}^{\infty} n \, \sqrt{1 + \frac{b^{2}}{n^{2}}} \, e^{-an} \\
&= \sqrt{b^{2}} + \sum_{n=1}^{\infty} n \, e^{-an} + \frac{b^{2}}{2} \, \sum_{n=1}^{\infty} \frac{e^{-an}}{n} + \sum_{r=2}^{\infty} \frac{(-1)^{r} \, \left(- \frac{1}{2}\right)_{r} \, b^{2r}}{r!} \cdot \sum_{n=1}^{\infty} \frac{e^{-an}}{n^{2r-1}} \\
&= \sqrt{b^{2}} - \partial_{a}\left(\frac{1}{e^{a}-1}\right) - \frac{b^{2}}{2} \, \ln(1 - e^{-a}) + \sum_{r=2}^{\infty} \frac{(-1)^{r} \, \left(- \frac{1}{2}\right)_{r} \, b^{2r}}{r!} \, Li_{2r-1}(e^{-a}) \\
&= \sqrt{b^{2}} + \frac{e^{a}}{(e^{a}-1)^{2}} - \frac{b^{2}}{2} \, \ln(1 - e^{-a}) + \sum_{r=2}^{\infty} \frac{(-1)^{r} \, \left(- \frac{1}{2}\right)_{r} \, b^{2r}}{r!} \, Li_{2r-1}(e^{-a}), 
\end{align}
where $Li_{n}(z)$ is the polylogarithm. 
</s>