TITLE: The Integral $\int\limits_0^1$ $\frac{e^x-\sum^{n-1}_{i=0} \frac{x^i}{i!}}{x^n}dx$
QUESTION [9 upvotes]: $\def \ein{\operatorname{Ein}}$
$\def \ei{\operatorname{Ei}}$

Evaluate $$\int\limits_0^1 \frac{e^x-\sum^{n-1}_{i=0} \frac{x^i}{i!}}{x^n}dx,$$
for $n\in\mathbb N$.

Specific case:
Case ($n=1$):
$$\int_0^1 \frac{e^x-1}{x}\,dx$$
Which is the exponential integral $\operatorname{ein}$
$$\ein(z)=-\int_0^z \frac{e^{-x}-1}{x}\,dx$$
Substituting $u=-x$
$$\ein(z)=-\int_0^{-z} \frac{e^{y}-1}{y}\,dy$$
$$-\ein(-1)=\ei(1)-\gamma-\ln(1)=\ei(1)-\gamma$$
But this doesn't seem to be generalizable as the $\ein$ and $\ei$ series seem to be uniquely similar enabling this.
I've also tried using wolfram alpha, which gives:
$$$$\begin{array}{|c|c|} \hline
n & \text{The Intergral} \\ \hline
1 & \ei(1)-\gamma \\ \hline
2 & \ei(1)-\gamma +2-e \\ \hline
3 & \frac{1}{2}(\ei(1)-\gamma+\frac{9}{2}-2e) \\ \hline
4 & \frac{1}{6}(\ei(1)-\gamma+\frac{59}{6}-4e) \\ \hline
5 & \frac{1}{24}(\ei(1)-\gamma+\frac{626}{24}-10e) \\ \hline
6 & \frac{1}{120}(\ei(1)-\gamma+\frac{10954}{120}-34e) \\ \hline
\end{array}$$$$
the oies was helpful in identifiying the $e$ coefficient to be the left factorial  (which is consistent with pax's answer)
And was unable to identify anything else.

REPLY [3 votes]: Assume that $n\geq 2$. Motivated by the OP's table, substituting the ansatz
$$
I_n = \frac{1}{{(n - 1)!}}\left( {\operatorname{Ei}(1) - \gamma  + q_n  - !(n - 1)e} \right)
$$
into the recurrence by @pax, we obtain
$$
q_{n + 1}  = q_n  + (n - 1)!\sum\limits_{i = 0}^n {\frac{1}{{i!}}}  = q_n  + \frac{{\left\lfloor {n!e} \right\rfloor }}{n}.
$$
This leads to
$$
q_n  = \sum\limits_{k = 1}^{n - 1} {\frac{{\left\lfloor {k!e} \right\rfloor }}{k}} .
$$
Thus
$$
\int_0^1 {\frac{1}{{x^n }}\left( {e^x  - \sum\limits_{i = 0}^{n - 1} {\frac{{x^i }}{{i!}}} } \right)dx}  = \frac{1}{{(n - 1)!}}\left( {\operatorname{Ei}(1) - \gamma  + \sum\limits_{k = 1}^{n - 1} {\frac{{\left\lfloor {k!e} \right\rfloor }}{k}}  - !(n - 1)e} \right)$$
for $n\geq 2$. Note that when empty sums are interpreted as $0$, this formula holds also when $n=1$.