how to numerically evaluate $\int_{0}^{\infty} \frac{1}{x!} dx$ So I was graphing the equation $ y=\frac{1}{x!} $ for $ x \geq 0$ and tried the integral:
$$\int_{0}^{\infty} \frac{1}{x!} dx$$
$$\int_{0}^{\infty} \frac{1}{\Gamma(x+1)} dx$$
$$\int_{0}^{\infty} \frac{1}{\int_{0}^{\infty} {z}^{x} e^{-z} dz} dx$$
And I dont know what to do with this so I figured I can do a Riemann sum which I did in Python:
import math

def riemann_sum(a, b):
    s = 0
    n = 100000 # n -> inf
    for i in range(n):
        d_x = (b-a)/n
        x_i = a+(d_x*i)
        fx_i = 1/math.gamma(x_i+1)
        s += fx_i*d_x
    return s

a = riemann_sum(0, 170) # b->inf
print(a)

2.2673843686870416
[Finished in 0.1s]

Is there more information on this, is this constant any use, did I do anything wrong? Just some guidance and discussion thanks.
$$\int_{0}^{\infty} \frac{1}{x!} dx \approx 2.2673843686870416$$
 A: A nice argument in contour integration show that
$$\int_0^\infty\dfrac{dx}{\Gamma(x+1)}=e-\int_0^\infty\dfrac{e^{-t}}{t(\log^2(t)+\pi^2)}\,dt$$
and
$$\int_0^\infty\dfrac{dx}{\Gamma(x)}=e+\int_0^\infty\dfrac{e^{-t}}{\log^2(t)+\pi^2}\,dt\;.$$
There are similar expressions where $1/\Gamma$ is replaced by $a^x/\Gamma$ for parameter $a$. And as Carlo Beenakker states, the first integral is
2.26653450769984883507196385767822...
A: From the definition of Gamma function,
$\frac{1}{\Gamma(x+1)}=\lim\limits_{n \to \infty} (n-1)^{-x-1}\frac{(x+1)(x+2)...(x+n)}{(n-1)!}$
Now, expanding $(x+1)(x+2)...(x+n)=\sum_{r=0}^{n} a_r x^{r}$
Where, $a_r=\text{sum of the products of n-r distinct elements}$
e.g $a_n=1, a_0=n!, a_{n-1}=\frac{n(n+1)}{2}$.
Using this we get,
$\frac{1}{\Gamma(x+1)}=\frac{1}{(n-1).(n-1)!}\lim\limits_{n \to \infty} \sum_{r=0}^{n} a_r x^r e^{-x\log (n-1)}$
Hence, $\int_{0}^{\infty} \frac{dx}{\Gamma(x+1)}$ is equals to
$$ \lim\limits_{n \to \infty} \left(\frac{1}{(n-1).(n-1)!} (\sum_{r=0}^{n} \frac{a_r}{\alpha^{r+1}}\int_{0}^{\infty} (x\alpha)^r e^{-x\alpha} d(x\alpha)\right)$$
(Where $\alpha=\log(n-1)$ )
$ =\lim\limits_{n \to \infty} \frac{1}{n!} (\sum_{r=0}^{n} \frac{a_r}{(\log(n-1))^{r+1}}\Gamma(r+1))$
$=\lim\limits_{n \to \infty} \frac{1}{n!} \sum_{r=0}^{n} \frac{a_r r!}{(\log(n))^{r+1}}$
A: def AA(a, b):
    s=0
    for i in range(1,int(n/2)):
        d_x = (b-a)/n
        x_i = a+(d_x*i)
        fx_i = 1/math.gamma(x_i)
        s += fx_i*d_x
    return s

https://en.wikipedia.org/wiki/Frans%C3%A9n%E2%80%93Robinson_constant
