I know that $(1-1/n)^n \approx 1/e$, but what is the result for $\left(1-\frac{c f(n)}{n}\right)^n$, where $c$ is an arbitrary constant and $f(n)$ is an arbitarry function of $n$?
I am asking because I am having trouble understanding these derivations: $E(x)=\binom{n}{2} (1-p)(1-p^2)^{n-2}$
Let $p=c \sqrt{\ln n / n}$
$E(x) \approx n^2/2 (1-c \sqrt{\ln n / n})(1-c^2 \ln n / n)^n$
$\approx n^2/2 e^{-c^2\ln n} \approx 1/2 n^{2-c^2}$
For $c>\sqrt 2$, then $E(x) \to 0$
Source: https://www.cs.cmu.edu/~avrim/598/chap4only.pdf, page 11
You cannot say much about an arbitrary function of $n$: the result will depend on the function.
For instance, for $f(n)=1/n$ $$ \left(1+\frac{1}{n^2}\right)^n \xrightarrow[n\to\infty]{} 1 $$ while for $f(n) = n$, of course $$ \left(1+1\right)^n \xrightarrow[n\to\infty]{} \infty\,. $$ and for say $f(n) = -\sqrt{n}$ $$ \left(1-\frac{1}{\sqrt{n}}\right)^n \xrightarrow[n\to\infty]{} 0\,. $$
In your specific case, however, for $f(n) = -c^2 \ln n$, $$ \left(1-\frac{c^2\ln n}{n}\right)^n = e^{n\ln\left(1-\frac{c^2\ln n}{n}\right)} = e^{-c^2\ln n + o(1)} = \frac{1+o(1)}{n^{c^2}} \xrightarrow[n\to\infty]{} 0\,, $$ using that $\ln(1+u)=u+O(u^2)$ when $u\to 0$.