What's the value of $n+\frac{n}{n+\frac{n}{n+\frac{n}{\ddots}}}$ for $n\in\mathbb{C}$?

Solution 1:

If $f_n(x) = n+n/x$, I'm not sure about your notation, but I think $(1)$ defines $\phi_n$ as the limit (provided it exists) of $f_n \circ f_n \circ \ldots \circ f_n (n)$.

Such a limit would be a fixpoint of $f_n$, which means one of the two complex numbers $y_n,z_n = \frac {n \pm \sqrt {n(n+4)}}2$.

To guess which one it is, we should wonder which one is the attractive fixpoint ,and which one is repulsive. $f_n'(x) = -n/x^2 = y_nz_n/x^2$, and so $|f'_n(y_n)| = |z_n/y_n| = 1/|f'_n(z_n)|$. To be attractive, the derivative at that point has to be small ($< 1$ in modulus), hence the solution with the bigger modulus will be attractive, and that's the one the sequence will converge to (unless the sequence accidentally ends up exactly on the smaller fixpoint).

One can check that the two fixpoints have the same modulus when $n \in [-4;0]$, so we can't really define what's $\phi_n$ for those values of $n$. Just look at the sequence for such an $n$, you will see it has chaotic behaviour. On the rest of the complex plane, by picking the bigger fixpoint you obtain a continuous function $n \mapsto \phi_n$ defined on $\Bbb C \setminus [-4;0]$.

So $(2)$ is only correct for $n>0$, and you have to switch the sign of the square root for $n < -4$

Solution 2:

Found why it's $-1$.
Rewrite the equation as :$$n\bigg(\frac{1+\frac1n\sqrt{n^2 + 4n}}{2}\bigg)$$ The square root can be written as $\sqrt{n^2(1+4/n)} = |n|\sqrt{1+4/n} = -n\sqrt{1+4/n}$ because $n<0$. Then you obtain : \begin{eqnarray*} \phi(n) &=& \frac{n}{2}\big(1-\sqrt{1+4/n}\big)\\ &=& \frac n2(1-(1+\frac2n) + O(n^{-2}))\\ &\to&-1 \end{eqnarray*}

Solution 3:

For any given $n \ne 0, -4$, let $( a_{n,m} )_{m\in\mathbb{Z}_{+}}$ be the sequence defined by $$a_{n,m} = \begin{cases}n,& m = 1\\\displaystyle n + \frac{n}{a_{n,m-1}},&m > 1\end{cases}$$ Let $\displaystyle\;\mu_n = \frac{n+\sqrt{n(n+4)}}{2}\;$ and $\displaystyle\;\nu_n = \frac{n-\sqrt{n(n+4)}}{2}\;$. It is easy to verify the following expression

$$a_{n,m} = \frac{\mu_n^{m+1} - \nu_n^{m+1}}{\mu_n^{m}-\nu_n^{m}}$$

provided a closed-form solution for $a_{n,m}$. On those portion of complex plane where $|\mu_n|$ differs from $|\nu_n|$, if is clear one of $\mu_n$ or $\nu_n$ will completely dominate the other one for large $m$. As a result, we can make the following partial summary about $\phi_n$.

$$\phi_n = \lim_{m\to\infty} a_{n,m} = \begin{cases} \mu_n, & |\mu_n| > |\nu_n|\\ \\ ???& |\mu_n| = |\nu_n|\quad\leftarrow \begin{array}{c} \small\verb/This includes the special/\\ \small\verb/special case when /n = 0, -4. \end{array} \\ \nu_n, & |\mu_n| < |\nu_n| \end{cases} $$ In particular, $$ \begin{array}{lcl} n \in (0,\infty) & \implies & |\mu_n| > |\nu_n| \implies \phi_n = \mu_n\\ n \in (-\infty,-4) & \implies & |\mu_n| < |\nu_n| \implies \phi_n = \nu_n \end{array} $$ and hence $$\lim\limits_{n\to-\infty}\phi_n = \lim\limits_{n\to-\infty}\nu_n = \lim\limits_{k\to\infty}\frac{-k+\sqrt{k(k-4)}}{2} = \lim\limits_{k\to\infty}\frac{-2k}{k+\sqrt{k(k-4)}} = -1 $$

Update

Let us switch to the case $|\mu_n| = |\nu_n|$ but $n \ne 0, -4$. In particular, this cover the range where $n \in (-4,0)$. Since $\mu_n\nu_n = -n$ and $\mu_n \ne \nu_n$, we can find a $\theta_n \in (0,\pi)$ such that

$$\big\{\; \mu_n, \nu_n \;\big\} = \big\{\; \sqrt{-n}e^{i\theta_n}, \sqrt{-n}e^{-i\theta_n}\;\big\}$$ In terms of $\theta_n$, we have

$$a_{n,m} = \sqrt{-n}\frac{\sin((m+1)\theta_n)}{\sin(m\theta_n)}$$

There are two sub-cases.

  • If $\displaystyle\;\frac{\theta_n}{\pi} \in \mathbb{Q}$, then $a_{n,m}$ is periodic in $m$. Notice when $\theta \in (0,\pi)$, $\displaystyle\;\frac{\sin((m+1)\theta)}{\sin\theta}$ is never an constant sequence. So $\phi_n$ diverges.
  • If $\displaystyle\;\frac{\theta_n}{\pi} \notin \mathbb{Q}$, then $a_{n,m}$ form a dense subset of the line $\big\{\; \sqrt{-n} t : t \in \mathbb{R} \;\big\} \subset \mathbb{C}$.
    Once again, $\phi_n$ diverges.

Finally, it leaves us the cases $n = 0$ and $n = -4$.

  • For $n = 0$, it is easy because start at $m = 2$, we encounter an undefined expression like $a_{0,2} = 0 + \frac{0}{0}$. So all $a_{0,m}, m \ge 2$ and hence $\phi_0$ are undefined.

  • For $n = -4$, we have $\mu_{-4} = \nu_{-4} = -2$. Notice $$\lim_{\mu\to\nu}\frac{\mu^{m+1}-\nu^{m+1}}{\mu^{m}-\nu^{m}} = \mu\frac{m+1}{m}$$ We will suspect $\displaystyle\;a_{-4,m} = -2\frac{m+1}{m}$. By direct substitution, one can check that this is indeed the case. As a result, $$\phi_{-4} = \lim\limits_{m\to\infty} a_{-4,m} = -2\lim_{m\to\infty}\frac{m+1}{m} = -2 = \nu_n$$

Combine all these, we obtain:

$$\phi_n = \lim_{m\to\infty} a_{n,m} = \begin{cases} \mu_n, & |\mu_n| > |\nu_n|\\ \nu_n, & |\mu_n| < |\nu_n|\quad\text{ or }\quad n = -4\\ \text{undefined},& n = 0\\ \text{diverges},& |\mu_n| = |\nu_n| \end{cases} $$ Update2

The final question is what are the set that $|\mu_n| = |\nu_n|$. It turns out when $n \ne 0$,

$$\begin{align} |\mu_n| = |\nu_n| &\iff \left|1 + \sqrt{1+\frac{4}{n}}\right| = \left|1 - \sqrt{1+\frac{4}{n}}\right| \iff \Re\left(\sqrt{1+\frac{4}{n}}\right) = 0\\ &\iff n \in [-4,0) \end{align}$$ In fact, if we define $\lambda(z)$ by

$$\mathbb{C}\setminus (-4,0] \ni z\quad\mapsto\quad \lambda(z) = \frac{z}{2}\left(1 + \sqrt{1 + \frac{4}{z}}\right) \in \mathbb{C},$$

$\lambda(z)$ will be a single-valued function over $\mathbb{C} \setminus (-4,0]$ and analytic over its interior $\mathbb{C} \setminus [-4,0]$.
Furthermore, $\lambda(n)$ coincides with $\mu_n$ and $\nu_n$ on $(0,\infty)$ and $(\infty,-4]$ respectively! What this means is the apparent switching of value of $\phi_n$ between $\mu_n$ and $\nu_n$ is really an artifact of how we label them.

At the end, we have a much simpler description for $\phi_n$.

$$\phi_n = \begin{cases} \frac{n}{2}\left(1 + \sqrt{1 + \frac{4}{n}}\right),& n \notin (-4,0]\\ \\ \text{ undefined/diverges },& n \in (-4,0] \end{cases}$$