1

I am interested in the behaviour when $n$ is large of the following function: $$f(n) := \frac{n^n}{n^n - (n - 1)^n + 1}.$$ The limit of this function as $n$ approaches infinity is $$\lim_{n \to \infty} f(n) = \frac{e}{e - 1},$$ where $e$ is Napier's Constant.

However, I would like to have more information about this function, such as a series expansion at $n = \infty$, where the dominant term is $e/(e - 1)$, and there is an explicit error term that is $o(1)$ as $n \to \infty$.

Wolfram Alpha doesn't want to give any expansion. Mathematica gives some expansion, but it is not immediate from the expression even that the limit is $e/(e - 1)$.

  • 4
    Suggestion: $f(n) = 1/(1-(1-\frac1n)^n+n^{-n})$. Write $\log (1-\frac1n)^n = n \log (1-\frac1n)$ using the Maclaurin series of $\log(1-x)$ to get secondary terms, then exponentiate it to get additional secondary terms for the denominator of $f(n)$. – Greg Martin Jun 01 '22 at 06:31
  • Thank you Greg. Using your method, I get $f(n) = e/(e - \exp(-\frac{1}{2n} + O(\frac{1}{n^2})) + n^{-n})$. Since $\exp(-1/2n) \to 1$, we can then see that $f(n) \to e/(e - 1)$. Thank you. –  Jun 01 '22 at 07:15
  • Is there a way to write $f(n) = \frac{e}{e - 1}(1 + o(1))$? –  Jun 01 '22 at 07:16
  • With more care ($e^{-1/2n} \sim -\frac1{2n}$) one can obtain $f(n) = \frac e{e-1} -\frac{e}{2 (e-1)^2} \frac1n + O(\frac1{n^2})$, and so on. – Greg Martin Jun 01 '22 at 07:18
  • Excellent! Thank you very much, Greg. I will write down your proof below. –  Jun 01 '22 at 07:22

2 Answers2

0

Here are the details of Greg Martin's answer.

First, $$f(n) = \frac{1}{1 - (1 - \frac{1}{n})^n + n^{-n}}.$$ Since $$\log(1 - \frac{1}{n})^n = n\log(1 - \frac{1}{n}) = n(-\frac{1}{n} - \frac{1}{2} \frac{1}{n^2} + O(\frac{1}{n^3})) = - 1 - \frac{1}{2}\frac{1}{n} + O(\frac{1}{n^2}),$$ exponentiating gives $$(1 - \frac{1}{n})^n = e^{-1 - \frac{1}{2}\frac{1}{n} + O(\frac{1}{n^2})} = \frac{1}{e} -\frac{1}{2e} \frac{1}{n} + O(\frac{1}{n^2}).$$ Hence, as $n^{-n} = O(1/n^2)$, $$(1 - \frac{1}{n})^n - n^{-n} = \frac{1}{e} -\frac{1}{2e} \frac{1}{n} + O(\frac{1}{n^2}),$$ also.

Therefore \begin{align} f(n) &= \frac{1}{1 - ((1 - \frac{1}{n})^n - n^{-n})} = \frac{1}{1 - (\frac{1}{e} -\frac{1}{2e} \frac{1}{n} + O(\frac{1}{n^2}))} = \frac{e}{e - 1 - \frac{1}{2}\frac{1}{n} + O(\frac{1}{n^2})} \\ &= \frac{e}{e - 1}\left(\frac{1}{1 - \frac{1}{2(e - 1)}\frac{1}{n} + O(\frac{1}{n^2})}\right) = \frac{e}{e - 1}(1 - \frac{1}{2(e - 1)} \frac{1}{n} + O(\frac{1}{n^2})). \end{align}

0

$$f_n= \frac{n^n}{n^n - (n - 1)^n + 1}\implies g_n=\frac 1{f_n}=1+n^{-n}-\left(\frac {n-1}n\right)^n$$ $$h_n=\left(\frac {n-1}n\right)^n\implies \log(h_n)=n\log\left(1-\frac {1}n\right)$$ $$\log(h_n)=-1-\frac{1}{2 n}-\frac{1}{3 n^2}+O\left(\frac{1}{n^3}\right)$$ $$h_n=e^{\log(h_n)}=\frac{1}{e}-\frac{1}{2 e n}-\frac{5}{24 e n^2}+O\left(\frac{1}{n^3}\right)$$ $$g_n=1+\frac{1}{e}-\frac{1}{2 e n}-\frac{5}{24 e n^2}+O\left(\frac{1}{n^3}\right)$$ $$f_n=\frac 1{g_n}=\frac{e}{e-1}\Bigg[1-\frac{1}{2 (e-1) n}+\frac{11-5 e}{24 (e-1)^2 n^2}+O\left(\frac{1}{n^3}\right) \Bigg]$$

Try it for $n=5$. The exact value is $$f_5=\frac{3125}{2102}=1.48668\cdots$$ while the truncated expansion gives $$f_5\sim \frac{e \left(671-1265 e+600 e^2\right)}{600 (e-1)^3}=1.48760\cdots$$ which is in a relative error of $0.062$%.