13

I was playing with recursively defined sequences, and stumbled upon a curious apparent result.

Let $u_1=\frac1N$, where $N\in\mathbb{Z^+}$, and $u_n=u_{n-1}+(u_{n-1})^2$.

Let $f(N)=$ number of terms in the sequence $\{u_n\}$ that are less than $1$. I used Excel to find that:

$f(2)=2$
$f(10)=12$
$f(100)=104$
$f(1000)=1006$
$f(10000)=10008$
$f(100000)=100011$

So it seems that the number of number of terms less than $1$, is approximately $N$. Why?

To put this more precisely,

Prove that $\lim\limits_{N\to\infty}\frac{f(N)}{N}=1$.

My attempt

I found a question called "What's known about recurrences involving $(a_n)^2$?", which led me to the concept of quadratic map, but these did not help me.

I found the sequence A122888 (a large list is here), which gives the coefficients of $x^k$ in the $n$th iteration of $x+x^2$. So for example, terms $a_7$ to $a_{14}$ are $\color{red}{1,3,6,9,10,8,4,1}$. This tells us that, in my original sequence, $u_4=\color{red}{1}(u_1)^1+\color{red}{3}(u_1)^2+\color{red}{6}(u_1)^3+\color{red}{9}(u_1)^4+\color{red}{10}(u_1)^5+\color{red}{8}(u_1)^6+\color{red}{4}(u_1)^7+\color{red}{1}(u_1)^8$. But I do not know what to make of this.

Dan
  • 35,053
  • 3
    de Bruijn, Asymptotic Methods in Analysis, does iteration for the sine function. The same methods should apply for the inverse $ \frac{-1 + \sqrt{1+4x}}{2} $ I once wrote: https://math.stackexchange.com/questions/208996/half-iterate-of-x2c/209653#209653 – Will Jagy Aug 29 '24 at 21:46
  • 1
    I agree with @WillJagy: it's essentially the same phenomenon that if we start with $1$ and then iterate $(-1+\sqrt{1+4x})/2$, the result after $N$ steps should be about $1/N$. – Greg Martin Aug 29 '24 at 21:54
  • 4
    Your relationship can be simplified by writing it under the form : $u_{n}+\tfrac12=(u_{n-1}+\tfrac12)^2+\tfrac14$, then setting $v_n=u_{n}+\tfrac12$, you have to work on $v_n=v_{n-1}^2+\tfrac14$ ! – Jean Marie Aug 29 '24 at 22:26
  • 1
    @Will Jagy Hi Will ! Rather oddly, I found that you had already worked on the sequence I advise to consider... – Jean Marie Aug 29 '24 at 22:34
  • 4
    @JeanMarie Hi! ....... I found this in de Bruijn, formula (8.5.3) on page 155. Taking $f(x) = \frac{-1+ \sqrt{1+4x}}{2}$ and $w_1 = 1$ with $w_{n+1} = f(w_n),$ we find $$ w_n = \frac{1}{n} + O\left( \frac{\log n}{n^2} \right)$$ – Will Jagy Aug 30 '24 at 00:21
  • 2
    I can show you a method to show that the number of iterations is about $N+\ln N+O(1)$... later tomorrow – JetfiRex Sep 03 '24 at 03:36
  • 1
    A rough heuristic is to replace the recurrence with the differential equation $u^\prime(n) = u(n)^2$, with initial condition $u(1) = 1/N$. This has solution $u(n) = 1/(N+1-n)$. – Michael Lugo Sep 04 '24 at 14:37

3 Answers3

2

The solution suggested in the comments is certainly great and also likely the more general way of doing things. Here is another version of the solution more tailored to the specific sequence at hand.

Let us analyze the time taken by the series to increase by a factor of $\alpha > 1$, starting from some $u_0$. We assume that $u_0 \alpha < 1$.

Let $K_1 := \max\{n : u_n \leq \alpha u_0\}$. Then for all $n < K$, we have, $$u_{n+1} \leq u_{n}\left( 1+ \alpha u_0\right) \implies u_{n+1} \leq u_0(1 + \alpha u_0)^{n+1}.$$

If we define $n_{\max} := \dfrac{\log \alpha}{\alpha u_0}$, then \begin{align*} u_{n_{\max}} \leq u_0(1 + \alpha u_0)^{n_{\max}} \leq u_0\exp\left( \alpha u_0 n_{\max} u_0 \right) \leq \alpha u_0. \end{align*}

This implies that $K_1 \geq \dfrac{\log \alpha}{\alpha u_0}$.

Similarly, if we define $K_2 := \max\{n : u_n \leq \alpha^2 u_0\}$ and repeat the same argument as above starting from $u_K$ instead of $u_0$, then we can conclude that $$ K_2 \geq K_1 + \dfrac{\log \alpha}{\alpha u_0} \geq \dfrac{\log \alpha}{\alpha u_0} \left(1 + \frac{1}{\alpha} \right). $$

We can further extend this argument as follows. For all $m = 1,2,\dots$, let $K_m = \max\{n : u_n \leq \alpha^m u_0\}$. Then, we have, \begin{align*} K_m \geq \dfrac{\log \alpha}{\alpha u_0} \sum_{r = 0}^{m-1} \alpha^{-r} = \dfrac{\log \alpha}{(\alpha - 1) u_0} \cdot (1 - \alpha^{-m}). \end{align*}

Note that by construction $f(N) \geq K_m$ for $m = \dfrac{\log N}{\log \alpha}$ and $u_0 = \frac{1}{N}$. Thus, \begin{align*} f(N) \geq N \cdot \dfrac{\log \alpha}{(\alpha - 1)} \cdot \left(1 - \frac{1}{N}\right). \end{align*}

If we set $\alpha = 1 + \varphi(N)$, where $\varphi$ is a decreasing function of $N$, like $\frac{\log N}{N}$, it is straightforward to that $\lim_{N \to \infty} \frac{f(N)}{N} \geq 1$. Using a similar argument with lower bound on $u_n$, we can conclude that $\lim_{N \to \infty} \frac{f(N)}{N} \leq 1$. On combining them, we arrive at the result.

I would like to point out that I was a bit cavalier using floor and ceil functions to ensure that the variables involved are indeed integers (as and when required). I really doubt that will make any issue and fixing that should be straightforward with a little bit of hardwork and book keeping.

sudeep5221
  • 3,284
2

As @Will Jagy and @Greg Martin suggested in the comments, the OP is equivalent to using the inverse, $a_{n+1}=\dfrac{-1+\sqrt{1+4a_n}}{2}$, with $a_1=1$, and showing that $\lim\limits_{n\to\infty}na_n=1$.

We have $\lim\limits_{n\to\infty}a_n=0$. Using Stolz-Cesaro's Theorem,

$\begin{align} \lim\limits_{n\to\infty}na_n&=\lim\limits_{n\to\infty}\frac{n}{\frac{1}{a_n}}\\ &=\lim\limits_{n\to\infty}\frac{(n+1)-n}{\frac{1}{a_{n+1}}-\frac{1}{a_n}}\\ &=\lim\limits_{n\to\infty}\frac{a_na_{n+1}}{a_n-a_{n+1}}\\ &=\lim\limits_{n\to\infty}\frac{a_n\left(\frac{-1+\sqrt{1+4a_n}}{2}\right)}{a_n+\frac{-1+\sqrt{1+4a_n}}{2}}\\ &=\lim\limits_{x\to0}\frac{x\left(\frac{-1+\sqrt{1+4x}}{2}\right)}{x+\frac{-1+\sqrt{1+4x}}{2}}\\ &=1 \space\text{ (by repeated use of L'Hopital's rule)}\\ \end{align}$

(I got help from this answer to another question.)

Dan
  • 35,053
2

Here is an alternative method to show that the number of iterations is $f(N)=N+\ln N+O(\ln \ln N)$ (not as comment... I made a false claim in the comment). This method is straightforward method (not calculating the inverse.)

Let $v_n=1/u_n$. So we have

$$v_{n+1}=\frac{1}{u_{n+1}}=\frac{1}{u_n^2+u_n}=\frac{1}{\frac 1{v_n^2}+\frac 1{v_n}}=v_n-1+\frac{1}{v_n+1}$$

Starting with a crude estimate: $f(N)\le 2N$. This is because $v_n\ge 1$ so $v_{n}-v_{n+1}\ge \frac 12$.

$$v_{n+1}=v_n-1+\frac{1}{v_n+1}\ge v_n-1$$

So we start with $v_0=N$ and $v_k\ge n-k$, and therefore, we have $f(N)\ge N$. Therefore, substitute this again,

$$v_{n+1}=v_n-1+\frac{1}{v_n+1}\le v_n-1+\frac{1}{N-n+1}$$

Therefore, we have $v_k\le N-k+\frac{1}{N+1}+\dots+\frac{1}{N-k+1}\le N-k+\ln(\frac{N}{k})$. And thus $v_N\le \ln N$. So, we have $f(N)\le N+f(\ln(N)+O(1))\le N+\ln N+O(\ln \ln N)$.

Also, we have $v_0,v_1,\dots,v_{N}$ is a decreasing sequence with decrement at most $1$. Since $v_N\le \ln N$, So for any $T=N,N-1,\dots,\lfloor\ln N\rfloor+1$ there exists $v_{k_T}$ such that $T-1< v_{k_T}\le T$. So we have $$\sum_{i=0}^N\frac{1}{v_i+1}\ge \sum_{i=\lfloor\ln N\rfloor+1}^N\frac{1}{v_{k_T}+1}\ge\sum_{i=\lfloor\ln N\rfloor+1}^N\frac{1}{i+1}\ge \ln(\frac{N}{\ln N})=\ln N-\ln\ln N.$$

So we have $f(N)\ge N+f(\ln N-\ln\ln N)\ge N+\ln N-\ln\ln N$. Therefore, we have $f(N)=N+\ln N+O(\ln \ln N)$.

JetfiRex
  • 3,315