Behavior of inverse of $f(s)=\frac{1}{H_n}\sum_{i=1}^n \left(1-\frac{1}{i}\right)^s\frac{1}{i}$ Take a function $f$ defined as follows with $H_n$ referring to Harmonic number
$$f(s,n)=\frac{1}{H_n}\sum_{i=1}^n \left(1-\frac{1}{i}\right)^s\frac{1}{i}$$
Suppose $g(\epsilon,n)$ is the inverse of this function, ie $f(g(\epsilon,n),n)=\epsilon$. I'm interested in behavior of $g(\epsilon,n)$ for fixed small $\epsilon>0$ as $n\to \infty$.
Plotting various values, it seems $g(10^{-6},n)\lesssim 10n$. Can someone see a way to explain this analytically?

Edit following Sal's suggestion, problem above can be rewritten as integral for large $n$, and the inverse in $s$ seems to grow (sub)linearly as well
$$f(s,n)\approx \frac{1}{\log n}\int_{i=1}^n \left(1-\frac{1}{i}\right)^{s} \frac{1}{i}$$

notebook
Edit Trying to match Katsurda approximate expression, it seems to give good results for x<25 after which it diverges rapidly
$$\sum_{j=2}^\infty \frac{(-x)^j}{j!}\zeta(j) \approx x(\log x + 2 \gamma -1)$$

After differentiating expression I get
$$\sum_{j=1}^\infty -\frac{(-x)^j}{j!} \approx \log x+2\gamma$$

 A: This answer applies only to the case $s$ is large but fixed and in the limit $n \to \infty.$  (That is, $s$ proportional to $n$ is not allowed.) It may be of limited applicability for your problem.  Write
$$ (1-1/k)^s = (1-1/k)^{k s/k} \approx e^{-s/k} $$
Then
$$  \sum_{k=1}^n(1-1/k)^s\frac{1}{k} \approx \sum_{k=1}^n \frac{e^{-s/k}}{k} =
\sum_{k=1}^n \frac{1}{k}(1+\sum_{m=1}^{\infty} \frac{(-s/k)^m}{m!})=$$
$$=H_n + \sum_{m=1}^\infty \frac{(-s)^m}{m!} \sum_{k=1}^{n} k^{-(m+1)} $$
$$ \approx H_n + \sum_{m=1}^\infty \frac{(-s)^m}{m!} \zeta(m+1) $$
where in the last line we let $n \to \infty$ from the penultimate line.
However, it can be shown (Katsurada) that
$$ \sum_{j=2}^\infty \frac{(-x)^j}{j!} \zeta(j) 
 \approx x(\log{x} + 2 \gamma -1) - \zeta(0)  + O(x^{1/4}\exp{(-2\sqrt{\pi}x))} $$
Take a derivative this expression, use the asymptotic formula for the harmonic number $H_n$, and collect results:
$$ 
\frac{1}{\log{n}}\sum_{k=1}^n(1-1/k)^s\frac{1}{k} \approx 
1-\frac{\log{s}+ \gamma}{\log{n}}
$$
This is easily inverted for whatever $s$ or $n$ you have, with the caveat that $s$ is large.
As an example, for $s=20$ and $n=10000,$ the last equation's left hand side is 0.6096 and the RHS approximation is 0.6121.
References:
'Power Series with the Riemann Zeta-function in the Coefficient,' M. Katsurada, Proc. Japan. Acad. 72 Ser. A (1996) p 61-63
'On Mellin-Barnes Type of Integrals & Sums Associated with the Riemann Zeta-function,' M. Katsurada,  Public De L' Institut Mathematique 62 (76) 1997, 13-25.
A: First note that
$$
\sum\limits_{i = 1}^n {\left( {1 - \frac{1}{i}} \right)^s \frac{1}{i}}  = \int_1^n {\left( {1 - \frac{1}{x}} \right)^s \frac{{dx}}{x}}  + \mathcal{O}(1)\frac{1}{n}\exp \left( { - s\log \left( {\frac{n}{{n - 1}}} \right)} \right)
$$
as $n\to +\infty$. Now
\begin{align*}
& \int_1^n {\left( {1 - \frac{1}{x}} \right)^s \frac{{dx}}{x}}  = \int_{1/n}^1 {\exp \left( { - s\log \left( {\frac{1}{{1 - t}}} \right)} \right)\frac{{dt}}{t}}  = \int_{\log \left( {\frac{n}{{n - 1}}} \right)}^{ + \infty } {\frac{{e^{ - sw} }}{w}\frac{w}{{e^w  - 1}}dw} 
\\ & = \int_{\log \left( {\frac{n}{{n - 1}}} \right)}^{ + \infty } {\frac{{e^{ - sw} }}{w}(1 + \mathcal{O}(w))dw} \\ & =
  E_1 \!\left( {s\log \left( {\frac{n}{{n - 1}}} \right)} \right) + \mathcal{O}(1)\frac{1}{s}\exp \left( { - s\log \left( {\frac{n}{{n - 1}}} \right)} \right)
\\ & = E_1 \!\left( {s\log \left( {\frac{n}{{n - 1}}} \right)} \right)\left( {1 + \mathcal{O}(1)\max\! \left( {\frac{1}{{s(\left| {\log (s/n)} \right| + 1)}},\frac{1}{n}} \right)} \right)
\end{align*}
as $n \to +\infty$. Here $E_1$ is the exponential integral (cf. http://dlmf.nist.gov/6.2.E1). Analogously,
$$
\frac{1}{n}\exp \left( { - s\log \left( {\frac{n}{{n - 1}}} \right)} \right) = E_1 \!\left( {s\log \left( {\frac{n}{{n - 1}}} \right)} \right)\mathcal{O}(1)\max \!\left( {\frac{1}{{n(\left| {\log (s/n)} \right| + 1)}},\frac{s}{{n^2 }}} \right)
$$
as $n\to +\infty$. Consequently,
$$
f(s,n) = \frac{1}{{H_n }}\sum\limits_{i = 1}^n {\left( {1 - \frac{1}{i}} \right)^s \frac{1}{i}}  \sim \frac{1}{{H_n }}E_1 \!\left( {s\log \left( {\frac{n}{{n - 1}}} \right)} \right),
$$
as $n\to +\infty$ uniformly in $s$, provided $s=o(n^2)$. Thus, $g(\varepsilon,n)$ satisfies
$$
E_1 \!\left(  g(\varepsilon ,n) \log \left( {\frac{n}{{n - 1}}} \right) \right) \sim \varepsilon H_n 
 \Longleftrightarrow g(\varepsilon ,n) \sim \frac{1}{\log \left( {\frac{n}{{n - 1}}} \right)}E_1^{ - 1} \!\left( {\varepsilon H_n } \right)
.
$$
Note that $\log \left( {\frac{n}{{n - 1}}} \right) \sim \frac{1}{n}$ for large $n$.
It is possible to show by asymptotic inversion that
$$
E_1^{ - 1} (x) =  - \log x - \log ( - \log x) - \frac{{\log ( - \log x) - 1}}{{\log x}} + \mathcal{O}\!\left( {\frac{{(\log ( - \log x))^2 }}{{\log ^2 x}}} \right),
$$
as $x\to 0+$, and
$$
E_1^{ - 1} (x) \sim e^{ - x - \gamma }  + e^{ - 2x - 2\gamma }  + \frac{5}{4}e^{ - 3x - 3\gamma }  +  \cdots 
$$
for moderate or large values of $x>0$.
A: Potential path to solution:

*

*Approximate the sum using integral and $p>1$
$$\sum_{i=1}^n \left(1-\frac{1}{i}\right)^s\frac{1}{i}\approx \sum_{i=1}^n \left(1-\frac{1}{i^p}\right)^s\frac{1}{i^p} \approx \int_{1}^n \left(1-\frac{1}{i^p}\right)^s\frac{1}{i^p} di$$


*Solve for the integral, in this answer
$$(p-1)\int_1^n \left(1-i^{-p}\right)^s \,i^{-p}\, di=\frac{\Gamma \left(2-\frac{1}{p}\right) \Gamma (s+1)}{\Gamma
   \left(s-\frac{1}{p}+2\right)}-n^{1-p} \,\,
   _2F_1\left(\frac{p-1}{p},-s;2-\frac{1}{p};n^{-p}\right)$$
For $p=1.01, n=1000, \epsilon=10^{-2}$, substituting closed form for the integral and inverting numerically gives a close match to $g(\epsilon, n)$:
1786.32 Exact 
1785.42 Integral approximation

notebook
Now to get the answer, one would need to take limit of $p\to 1$ and further simplify to get a closed form for the inverse.
