TITLE: Does parity matter for $\lim_{n\to \infty}\left(\ln 2 -\left(-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots -\frac{(-1)^n}{n}\right)\right)^n =\sqrt{e}$?
QUESTION [11 upvotes]: Prove that $$\lim_{n\to \infty}\left(\ln 2 -\left(-\frac12+\frac13-\frac14+\cdots  -\frac{(-1)^n}n\right)\right)^n =\sqrt{e}$$

I happened to encounter this problem proposed  by Mohammed Bouras,Morocco in the facebook group of Romanian mathematical Magazine
As per the  title,  I think the limit of the problem depends upon the parity of $n$. That is,if $n$ is even, the limit is $\frac1{\sqrt e}$ otherwise as stated.
My query is, Does the parity indeed matters for this problem? And if it matters what should be  the conclusion for limit of the problem?
Here is my try
we will show that the there exist two different limits  for above problem.
For  $0< x\leq 1$, we define the functions $$f(x)=\ln(1+x),\; \displaystyle g(x)=\sum_{k=1}^n \frac{(-x)^k}{k+1}$$ and we note that $$\begin{aligned}f(x)-g(x) &= x-\sum_{k=2}^\infty(-1)^{k+n} \frac{x^{k+n}}{k+n}\\&=x+\sum_{k=2}^{\infty} (-1)^{k+n} \int_0^x t^{k+n-1}dt\\&=x+(-1)^n\int_0^x t^n\left(\sum_{k=1 }^\infty(-1)^k t^{k-1} \right)dx\\&=x-(-1)^n\int_0^x\frac{t^n}{1+t} dt\end{aligned}$$ hence for $x=1$   we have then $$f(1)-g(1)=\ln(2)-\sum_{k=1}^\infty\frac{(-1)^k}{k+1}=1-(-1)^n\int_0^1\frac{t^n}{1+t}dt$$ Note that latter integral is know result however,here we shall derive it and  we shall show that

$$\displaystyle\lim_{n\to\infty}(f(1)-g(1))^n =\begin{cases}\sqrt{e}\; \text{if }  \, n\in 2n-1 \\  \frac1{\sqrt{e}} \; \text{otherwise}\end{cases}$$

We solve the following integral for any $n>0$. By  polynomial long division it  is trivial to note that  $$\int_0^1\frac{t^n}{t+1}dt=(-1)^n\int_0^1\left(\frac{1}{t+1}-\sum_{0\leq j\leq n}(-1)^j t^{j-1}\right)dt$$  and hence on integrating $\displaystyle \int_0^1\frac{t^n}{1+t}dt$ $$\begin{aligned}&=(-1)^n\left(\log(2) -\sum_{1\leq j\leq n} \frac{(-1)^{j+1}}{j}\right)\\&=2^{-1}\left(-\psi\left(\frac{n+1}2\right)+\psi\left(\frac{2n+1}2\right)\right)\\&=\frac12\left(H_{\frac{n}2}-H_{\frac{n-1}2}\right)\end{aligned}$$ Further we note that $H_n\approx \gamma +\ln n +\frac1{2n}-O(n^{-2})$  with which we deduce that $$H_{\frac{n}2} -H_{\frac{n-1}2} \approx  \frac1n-\ln\left(\frac{n-1}n\right)+\frac1{n-1}$$ for all $n>1$ and hence $H_{\frac{n}{2}} -H_{\frac{n-1}2} \to \frac1n$as $n$ gets larger. Thus we have for $$\lim_{n\to\infty}(f(1)-g(1))^n= \lim_{n\to\infty} \left(1-\frac{(-1)^n}{2n}\right)^n=e^{-\frac{(-1)^n}2} =\sqrt{e^{-(-1)^n}}$$
therefore  if $n$ is even we have limit as $\displaystyle \frac1{\sqrt{e}}$ and if $n$ is odd we  have limit $ \displaystyle \sqrt{e}$.
Since we have two different limits. Does it have limit ?
Thank you

REPLY [2 votes]: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\, }
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[15px,#ffd]{\lim_{n \to \infty}\braces{\ln\pars{2} -
\bracks{-\,{1 \over 2} + {1 \over 3} - {1 \over 4} + \cdots -{\pars{-1}^{n} \over n}}}^{n} = \root{\expo{}}}:\ {\Large ?}}$

\begin{align}
&\bbox[15px,#ffd]{\lim_{n \to \infty}\braces{\ln\pars{2} -
\bracks{-\,{1 \over 2} + {1 \over 3} - {1 \over 4} + \cdots -{\pars{-1}^{n} \over n}}}^{n}}
\\[5mm] = &\
\lim_{n \to \infty}\bracks{\ln\pars{2} +
\sum_{k = 2}^{n}{\pars{-1}^{k} \over k}}^{n}
\\[5mm] = &\
\lim_{n \to \infty}\bracks{\ln\pars{2} + 1 +
\sum_{k = 1}^{\infty}{\pars{-1}^{k} \over k} -
\sum_{k = n + 1}^{\infty}{\pars{-1}^{k} \over k}}^{n}
\\[5mm] = &\
\lim_{n \to \infty}\bracks{1  -
\sum_{k = n + 1}^{\infty}{\pars{-1}^{k} \over k}}^{n} =
\lim_{n \to \infty}\bracks{1  -
\pars{-1}^{n + 1}\sum_{k = 0}^{\infty}
{\pars{-1}^{k} \over k + n + 1}}^{n}
\\[5mm] = &\
\lim_{n \to \infty}\bracks{1  +
\pars{-1}^{n}\sum_{k = 0}^{\infty}\pars{%
{1 \over 2k + n + 1} - {1 \over 2k + n + 2}}}^{n}
\\[5mm] = &\
\lim_{n \to \infty}\bracks{1  +
{1 \over 4}\pars{-1}^{n}\sum_{k = 0}^{\infty}
{1 \over \pars{k + n/2 + 1/2}\pars{k + n/2 + 1}}}^{n}
\\[5mm] = &\
\lim_{n \to \infty}\braces{1  +
{1 \over 2}\pars{-1}^{n}
\bracks{\Psi\pars{{n \over 2} + 1} -
\Psi\pars{{n \over 2} + {1 \over 2}}}}^{n}
\end{align}
Note that
\begin{align}
&\Psi\pars{{n \over 2} + 1} -
\Psi\pars{{n \over 2} + {1 \over 2}}
\,\,\,\stackrel{\mrm{as}\ n\ \to\ \infty}{\sim}\,\,\,
{1 \over n} - {1 \over 2n^{2}}
\end{align}

Then,
\begin{align}
&\mbox{}
\\
&\bbx{\bracks{\ln\pars{2} +
\sum_{k = 2}^{n}{\pars{-1}^{k} \over k}}^{n}
\,\,\,\stackrel{\mrm{as}\ n\ \to\ \infty}{\sim}\,\,\,
\bracks{1 + \pars{-1}^{n}{\color{red}{1/2} \over n}}^{n}}
\\ &
\end{align}