Evaluating the sum $\sum_{n=1}^{\infty} \frac{e - \left(1 + \frac{1}{n}\right)^n}{\sqrt{n}}$

I want to evaluate $$\sum_{n=1}^{\infty} \frac{e - \left(1 + \frac{1}{n}\right)^n}{\sqrt{n}}$$ But I'm not sure how to approach it. Mathematica suggests that it converges pretty slowly and gives something like 2.57... after around 20,000 terms, but then starts to choke.

To see that it converges, I think I can write the following: $$\left(1 + \frac{1}{n}\right)^n = e^{n \ln\left(1 + \frac{1}{n}\right)} = e^{n\left(\frac{1}{n} - \frac{1}{2n^2} + O(n^{-3})\right)} = ee^{-\frac{1}{2n}}e^{O(n^{-2})} $$ and note that $e^{O(n^{-2})} \to 1$ as $n \to \infty$, so that $$ e - \left(1 + \frac{1}{n}\right)^n \approx e - ee^{-\frac{1}{2n}} = e(1 - e^{-\frac{1}{2n}}) = e\left(\frac{1}{2n} + O(n^{-2})\right) = O(n^{-1})$$

and we have $$\frac{e - \left(1 + \frac{1}{n}\right)^n}{\sqrt{n}} = O(n^{-3/2})$$ which says this is asymptotically just a p-series.

Any ideas?


Solution 1:

First, excellent job on estimating the summand - few people are skilled with power-series manipulations like that.

If you expand the summand into a power series (at $n=\infty$), you'll get something of the form $$ \frac{e-(1+\frac1n)^n}{\sqrt n} = \frac e2n^{-3/2} - \frac{11e}{24}n^{-5/2} + \frac{7e}{16}n^{-7/2} + \cdots = \sum_{k=0}^\infty c_k n^{-k-3/2} $$ for certain easily computed constants $c_k$. Choosing whatever truncation points $K$ and $N$ you like, you can then write \begin{align*} \sum_{n=1}^\infty \frac{e-(1+\frac1n)^n}{\sqrt n} &= \sum_{n=1}^\infty \bigg( \sum_{k=0}^K c_k n^{-k-3/2} + \bigg( \frac{e-(1+\frac1n)^n}{\sqrt n} - \sum_{k=0}^K c_k n^{-k-3/2} \bigg) \bigg) \\ &= \sum_{k=0}^K c_k \zeta(k+3/2) + \sum_{n=1}^N \bigg( \frac{e-(1+\frac1n)^n}{\sqrt n} - \sum_{k=0}^K c_k n^{-k-3/2} \bigg) + \sum_{n>N} O(n^{-K-5/2}). \end{align*} Everything other than the error term can be calculated to as many decimal places as you want (and the implicit constant in the $O$-notation could also be calculated, if you want to be completely rigorous). With this accelerated convergence, I find the value of your original sum to be $2.5912775703968337633$, probably accurate to that many decimal places.

(Then, if you want, you can try an inverse constant lookup to see if that value matches any closed form - although I doubt it will in this case.)

Solution 2:

Here we find another representation of the sum with improved convergence properties.

We have $$\begin{eqnarray*} e - \left(1 + \frac{1}{n}\right)^n &=& \sum_{k=0}^\infty \frac{1}{k!} - \sum_{k=0}^n {n\choose k} \frac{1}{n^k} \\ &=& \sum_{k=0}^\infty \frac{1}{k!} \left(1-\frac{n!}{(n-k)!}\frac{1}{n^k}\right) \\ &=& \sum_{k=1}^\infty \frac{1}{k!} \left(1-\frac{n^{\underline k}}{n^k}\right), \end{eqnarray*}$$ where $n^{\underline k}$ is the falling factorial. But $$n^{\underline k} = \sum_{j=1}^k (-1)^{k-j} \left[ k\atop j\right] n^j,$$ where $\left[ k\atop j\right]$ is the unsigned Stirling number of the first kind. Thus, $$\begin{eqnarray*} e - \left(1 + \frac{1}{n}\right)^n &=& -\sum_{k=2}^\infty \frac{1}{k!} \sum_{j=1}^{k-1} (-1)^{k-j} \left[ k\atop j\right] \frac{1}{n^{k-j}}, \end{eqnarray*}$$ and so $$\begin{eqnarray*} \sum_{n=1}^{\infty} \frac{e - \left(1 + \frac{1}{n}\right)^n}{\sqrt{n}} &=& \sum_{k=2}^\infty \underbrace{\frac{1}{k!} \sum_{j=1}^{k-1} (-1)^{k-j+1} \left[ k\atop j\right] \zeta(k-j+\textstyle \frac{1}{2})}_{a_k}. \end{eqnarray*}$$

Below we give the partial sums to 50 digits. $$\begin{array}{cl} N & \sum_{k=2}^N a_k \\ \hline 10 & 2.5912768743966448667041943446771083714079106923575 \\ 20 & 2.5912775703968337622590116959919424146275651059115 \\ 30 & 2.5912775703968337632934326247597530975932248904119 \\ 40 & 2.5912775703968337632934326247597625731591505820979 \\ 50 & 2.5912775703968337632934326247597625731591505821009 \end{array}$$

Solution 3:

Start with the power series for $n\log\left(1+\frac1n\right)\color{#C00000}{-1}$: $$ -\frac1{2n}+\frac1{3n^2}-\frac1{4n^3}+\frac1{5n^4}-\frac1{6n^5}+\dots\tag{1} $$ Apply the power series for $\color{#C00000}{1}-e^x$ to $(1)$ and divide by $\sqrt{n}$: $$ \frac1{2n^{3/2}}-\frac{11}{24n^{5/2}}+\frac7{16n^{7/2}}-\frac{2447}{5760n^{9/2}}+\dots\tag{2} $$ Finally, apply the Euler-Maclaurin Sum Formula to $(2)$: $$ \frac Se-\frac1{n^{1/2}}+\frac5{9n^{3/2}}-\frac7{15n^{5/2}}+\frac{4391}{10080n^{7/2}}-\dots\tag{3} $$ Due to the $\color{#C00000}{-1}$ in $(1)$ and the $\color{#C00000}{1}$ in $(2)$ instead of $e$, $(3)$ needs to be multiplied by $e$ to approximate $$ \sum_{k=1}^n\frac{e-\left(1+\frac1k\right)^k}{\sqrt{k}}\tag{4} $$ Using $(3)$ out to the $n^{-35/2}$ term and $(4)$ with $n=10000$, we get $$ S=\small 2.59127757039683376329343262475976257315915 05821009\ 381932479091255849847307 $$ which agrees with user26872's answer.


Asymptotic Expansion

Here is the expansion started in $(3)$: $$ \begin{align} &\frac1e\sum_{k=1}^n\frac{e-\left(1+\frac1k\right)^k}{\sqrt{k}}\\[4pt] &=\frac Se-\frac1{n^{1/2}}+\frac5{9n^{3/2}}-\frac7{15n^{5/2}}+\frac{4391}{10080n^{7/2}}-\frac{21949}{51840n^{9/2}}+\frac{6656599}{15966720n^{11/2}}\\[4pt] &-\frac{397567}{967680n^{13/2}}+\frac{528603833}{1306368000n^{15/2}}-\frac{271019261}{676823040n^{17/2}}+\frac{1395775243843}{3494795673600n^{19/2}}\\[4pt] &-\frac{3075041160157}{7725337804800n^{21/2}}+\frac{13560289331497903}{34648140054528000n^{23/2}}-\frac{25805885669173201}{66952927641600000n^{25/2}}\\[4pt] &+\frac{3117317490074490877}{7809389480116224000n^{27/2}}-\frac{6994535029664135647}{16775725549879296000n^{29/2}}\\[4pt] &+\frac{1574300404641490648151}{4572831395579166720000n^{31/2}}-\frac{6450883875238096571903}{28322052514554839040000n^{33/2}}\\[4pt] &+\frac{3169495620834596471965948267}{4746209560389099926323200000n^{35/2}} \end{align} $$