Given the following function, whose value depends on a function $g(n)$ of which we can only know its asymptotic growth: $$f(n)=\left(1-\frac{1}{n}\right)^{g(n)}$$
I want to calculate its limit when $n\to\infty$, knowing that $g(n)$ can have the following asymptotic growths:
$$g(n)=\begin{cases} O(n)\\ \Theta(n)\\ O(nH_n)-O(n)\sim O(n\log(n))-O(n)\\ \Theta(nH_n)\sim \Theta(n\log(n)) \end{cases}$$ As seen, it spans from 0 to $\Theta(nH_n)$, with an intermediate case that divides the range between all the functions that grow slower than $O(n)$ and the remaining ones that lie between $O(n)$ and $O(nH_n)$. Now, when taking the limit for the first case where $g(n)$ is upper bounded by $n$:
$$\lim_{n\to\infty} f(n)=\lim_{n\to\infty} e^{-g(n)/n}=\lim_{n\to\infty} e^{0}=1 \quad[g(n)=O(n)]$$
It converges to 1, similar to the $g(n)=\Theta(n)$ case:
$$\lim_{n\to\infty} f(n)=\lim_{n\to\infty} e^{-c\cdot n/n}=\lim_{n\to\infty} e^{-c}=e^{-c} \quad[g(n)=O(n)]$$ However, if $g(n)$ lies above the $n$ bound and below the $nH_n$ one: $$\lim_{n\to\infty} f(n)=\lim_{n\to\infty} e^{-n\cdot h(n)/n}=\lim_{n\to\infty} e^{-h(n)}=0$$ For it to equal 1, as the previous cases, it would need to be multiplied by a decay of the form $e^{h(n)}$, with $h(n)=O(nH_n)$. However, considering the following limit:
$$\lim_{n\to\infty} \left(1-\frac{1}{n}\right)^{n(H_n-H_{n-n^k})}\sim \lim_{n\to\infty} \left(1-\frac{1}{n}\right)^{n(\log(n)-\log(n-n^k))}=1\quad [0\leq k< 1]$$ It seems to contradict the prior results, as $n^k$ can range from 0 to $n$ and then lead to a function in the exponent that grows above $n$ but below $nH_n$, reaching its exact growth on $\infty$. So, I checked that $n(H_n-H_{n-n^k})$ is asymptotically equivalent to $n^k$, which implies that for $k\in[0,1)$ the limit should converge to 1, which is true. But my question is, does actually the function $n(H_n-H_{n-n^k})$ of the last case, or its continuous version with logarithms, span all the functions of the set $O(nH_n)-O(n)$ when $k$ ranges from 0 to 1?
It seems like the first results are correct, given the infinitesimal substitution $e^{-g(n)/n}$, however, is there any way to prove that such substitution is valid, apart from taking the limit of its ratio with the original $f(n)$??