Here, all $f(n)$ and $g(n)$ mentioned, are functions that assume integers values for some integer $n>0$.
If $n>0$ and integer, we have that $I_n = \int_0^1 x^ne^xdx = f(n)e+g(n)$ where $f(n)=(-1)^n!n$ and $g(n) = (-1)^{n+1}n!$ and $\lim_{n\to \infty} f(n)e + g(n) = 0$. To find $f$ and $g$ above we can evaluate $I_0, I_1,I_2,...$ until a pattern is finded. And the limit is here $\lim_{n \to \infty} (-1)^n !ne+ (-1)^{(n+1)} n! = 0 \: ?$
After that I wonder if there are other functions $f(n)$ and $g(n)$ such that $\lim_{n\to \infty} f(n)e + g(n) = 0\:?$ How to find they? What is the process of creating they?
I'm asking this because I wanted to do something similar for the catalan constant, that is, finding functions $f(n),g(n)$ such that $\lim_{n\to\infty}f(n)(C-1)+g(n)C = 0$.
Here's one way to do it. It's well defined but doesn't give you a way to compute $f(n)$ or $g(n)$ very efficiently.
consider the fractional part of $e \cdot n$, here written $\mathrm{F}(e \cdot n)$ .
Let's define $f$ as follows.
$$ f(1) \stackrel{df}{=} 1 $$ $$ f(n) \stackrel{df}{=} \min \bigg\{ k \;|\; k \in \mathbb{N} \;\land\; k \gt f(n-1) \;\land\; \mathrm{F}(e \cdot k) \lt \mathrm{F}(e \cdot f(n-1)) \bigg\} $$
So, each successive value in the sequence $f(n)$ is sent to the smallest natural number possible such that $\mathrm{F}(\,f(n) \cdot e\,)$ is strictly monotonically decreasing. The extra condition $k \gt f(n-1)$ is, strictly speaking, redundant.
And then we define $g$ to be the floor of $e \cdot f(n)$ .
$$ g(n) \stackrel{df}{=} \left\lfloor e \cdot f(n) \right\rfloor $$
Here are the first few values of $f(n)$