Any simpler expression for$\frac{\sum_{k=2}^{n-2}{k\big(\sum_{i=0}^{n-2}\frac{(-1)^i}{i!}\big)}}{n\sum_{i=0}^{n}\frac{(-1)^i}{i!}}$

146 Views Asked by At

Is there any simpler form for the following expression:

$$ \frac{\sum_{k=2}^{n-2}{k\left(\sum_{i=0}^{n-2}\frac{(-1)^i}{i!}\right)}}{n\sum_{i=0}^{n}\frac{(-1)^i}{i!}}$$

Because I have to compute this expression for $n=100$, and without using any computing packages, doing this would be really tedious and painful.

If anybody knows how to simplify the expression (or simple methods to compute it by hand), I would highly appreciate it.

4

There are 4 best solutions below

2
On BEST ANSWER

$$A_n=\frac{\sum_{k=2}^{n-2}{k\left(\sum_{i=0}^{n-2}\frac{(-1)^i}{i!}\right)}}{n\sum_{i=0}^{n}\frac{(-1)^i}{i!}}=\frac{\sum_{i=0}^{n-2}\frac{(-1)^i}{i!} }{n\sum_{i=0}^{n}\frac{(-1)^i}{i!}} \sum_{k=2}^{n-2}k=\frac{1}{2} (n-3) n\frac{\sum_{i=0}^{n-2}\frac{(-1)^i}{i!} }{n\sum_{i=0}^{n}\frac{(-1)^i}{i!}} $$ Now $$\sum_{i=0}^{p}\frac{(-1)^i}{i!}=\frac{\Gamma (p+1,-1)}{e\,\Gamma (p+1)}$$ where appear the complete and incomplete gamma functions. Replacing the values of $p$, we then get $$A_n=\frac{(n-3) \Gamma (n+1) \Gamma (n-1,-1)}{2 \Gamma (n-1) \Gamma (n+1,-1)}=\frac{1}{2} (n-3) (n-1) n\,\frac{\Gamma (n-1,-1)}{\Gamma (n+1,-1)}$$ which can also be written as $$A_n=\frac{1}{2} (n-3) (n-1) n\,\frac{!(n-2)}{!n}$$ where appears the subfactorial function which gives the number of permutations of $n$ objects that leave no object fixed.

If you look here, you will notice that $$\lim_{n\to\infty} {!n \over n!} = {1 \over e} $$ . So, for large values of $n$ , $$A_n\approx \frac{1}{2} (n-3) (n-1) n\,\frac{(n-2)!}{e}\,\frac e {n!}= \frac{1}{2} (n-3)$$

For example, for $n=10$, the exact value is $\frac{519155}{148329}\approx 3.5000236$ for an approximation of $3.5$; for $n=100$, the values differ by $1.4\times 10^{-154}$; for $n=1000$, the values differ by $3.4\times 10^{-2562}$. I suppose that you can stay with this good (and may be surprising) approximation.

Edit

If you look here, you will notice the approximation $$!z=\sqrt{2 \pi } \,e^{-(z+1)}\, z^{z+\frac{1}{2}} \left(1+\frac{1}{12 z}+\frac{1}{288 z^2}+O\left(\frac{1}{z^3}\right)+\cdots\right) $$ Using it for the estimation of $\frac{!(n-2)}{!n}$ we get $$\frac{!(n-2)}{!n}=\frac{1}{n^2}+\frac{1}{n^3}+\frac{1}{n^4}+\frac{1}{n^5}+O\left(\frac{1}{n^6}\right)$$ which, continuing the expansions, finally makes $$A_n=\frac {n-3}2+\frac{139}{17280 \,n^3}+\frac{1673}{207360\, n^4}+O\left(\frac{1}{n^5}\right)$$

0
On

$$\sum_{k=1}^{n-2}k=\frac 1 2 (n-1)(n-2)$$

Then we write: $$\sum_{i=0}^{n-2}\frac{(-1)^i}{i!}=\sum_{i=0}^{n}\frac{(-1)^i}{i!}-[\frac{(-1)^n}{n!} +\frac{(-1)^{n-1}}{(n-1)!}]$$

Then you can write it as:

$$\frac{(n-1)(n-2)}{2n} - \frac{\frac 1 2 (n-1)(n-2)[\frac{(-1)^n}{n!} +\frac{(-1)^{n-1}}{(n-1)!}]}{\sum_{i=0}^{n}\frac{(-1)^i}{i!}}$$

You are only left with one summation.

2
On

The second part of your numerator doesn't depend on $k$ so you could evaluate each part separately.

$$\sum_{k=2}^{n-2}=\frac{n(n-3)}{2}$$

The other parts can then be written in terms of the $\Gamma$ function (both normal form and incomplete form):

$$\sum_{i=0}^{n-2}\frac{(-1)^i}{i!}=\frac{\Gamma_{-1}(n-1)}{e\cdot\Gamma(n-1)}$$

$$\sum_{i=0}^{n}\frac{(-1)^i}{i!}=\frac{\Gamma_{-1}(n+1)}{e\cdot\Gamma(n+1)}$$

where $\Gamma(n)$ is the regular Gamma function and $\Gamma_{-1}(n)$ is the incomplete Gamma function (evaluated with $x=-1)$

As $n$ is an integer you can replace $\Gamma(n)$ with $(n+1)!$ but I'm not sure of a similar simplification for $\Gamma_{-1}(n)$.

So the entire thing could be rewritten as:

$$\frac{(n-3)(n+2)!\cdot\Gamma_{-1}(n-1)}{2\cdot n!\cdot\Gamma_{-1}(n+1)}$$

$$=\frac{(n-3)(n+2)(n+1)\cdot\Gamma_{-1}(n-1)}{2\cdot\Gamma_{-1}(n+1)}$$

1
On

Do you need an exact or approximate answer? If approximate, how accurate (how many places)?

The Taylor polynomial $T_n(x)$ for $f(x)=e^x$ about $0$ of degree $n$ is $$T_n(x)=\sum_{k=0}^{n}\frac{x^k}{k!},$$ and the Mean Value Theorem (or explicit Lagrange form) for the remainder $R_n(x)=f(x)-T_n(x)$ is that there exists some $\xi_n$ between $0$ and $x$ so that $$R_n(x)=\frac{f^{(n+1)}(\xi_n)}{(n+1)!}x^{n+1}.$$ This gives us a strong bound on the difference of the sums you have from $e^{-1}$: $$R_n(-1)=e^{-1}-\sum_{k=0}^{n}\frac{(-1)^k}{k!}=\frac{(-1)^{n+1}e^{\xi_n}}{(n+1)!}\qquad\text{for some}\quad\xi_n\in(-1,0).$$ Note that $e^{\xi_n}<1$ for each $n$, and replacing $\xi_n$ by 0 gives us an upper bound on $|R_n(-1)|$: $$|R_n(-1)|<\frac1{(n+1)!}.$$ So in particular, there exist constants $\xi_{n-2},\xi_{n}\in(0,1)$ (probably very close to $-1$) so that your expression (say $E_n$) is $$\begin{align} E_n &=\frac{\left(\sum_{k=2}^{n-2}k\right) \left(\sum_{i=0}^{n-2}\frac{(-1)^i}{i!} \right)}{\sum_{i=0}^{n}\frac{(-1)^i}{i!}} \\&=\frac1n\cdot\left(\frac{(n-1)(n-2)}2-1\right) \cdot\frac{T_{n-2}(-1)}{T_{n}(-1)} \\&=\frac{n-3}2\cdot\frac{e^{-1}-R_{n-2}(-1)}{e^{-1}-R_{n}(-1)} \\&=\frac{n-3}2\cdot\frac{ e^{-1}-\frac{(-1)^{n-1}e^{\xi_{n-2}}}{(n-1)!} }{e^{-1}-\frac{(-1)^{n+1}e^{\xi_n}}{(n+1)!}} \end{align}$$ and, for $n=100$, $$\begin{align} E_{100} &=\frac{97}2\cdot\frac{ e^{-1}+{e^{\xi_{98}}}/{99!} }{ e^{-1}+{e^{\xi_{100}}}/{101!} } \\&\approx\frac{97}2\cdot\frac{e^{-1}+1/99!}{e^{-1}+1/101!}\\&= \frac{97}2\left(1+\frac{e}{99!}\left(1-\frac1{100\cdot101}\right)\right). \end{align}$$ This is certainly quite close to $\frac{97}2$; you could use Stirling's approximation to estimate that $100!\approx9.3\times10^{157}$, so $E_{100}$ should be just a fraction of this larger than $\frac{97}2$, and $48.5$ should be accurate to over $150$ decimal places.