Showing that $a_{n+1}=\frac{n}{a_n}-a_n-a_{n-1}$ with $a_0 = 0$ and $a_1=2\Gamma(\frac34)\big/\Gamma(\frac14)$ stays positive for $n\geq1$.

This posting consists of several mildly-related questions, motivated from this posting. The main object is the following sequence.

$$a_0 = 0, \qquad a_1 = x, \qquad a_{n+1} = \frac{n}{a_n} - a_n - a_{n-1}. \tag{*}$$

Question 1. Numerical experiment suggests that there is a unique value of $x$ for which $a_n > 0$ for all $n \geq 1$. Can we prove/disprove this?

If we write $I_n = \{ x \in \mathbb{R} : a_1 > 0, \cdots, a_n > 0\}$, then obviously $I_n$ is a nested sequence of open sets that begins with $I_1 = (0, \infty)$. Moreover, the experiment suggests that $I_n$ are all intervals, and the endpoints of $I_n$ are adjacent poles of $a_{n+1}$ and $a_{n+1}$ is strictly monotone on $I_n$. Provided this is correct, we easily see that there is a unique zero of $a_{n+1}$ on $I_{n+1}$, which then determines $I_{n+1}$.

Plots of a_{n+1} on I_n

Question 2. The same experiment also suggests that the value of such unique $x$ is

$$ \frac{\operatorname{AGM}(1,\sqrt{2})}{\sqrt{\pi}} = \frac{2\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{1}{4}\right)} \approx 0.675978240067284728995\cdots.$$

At this point, I completely have no idea why this value arises, but I have checked that this is correct up to hundreds of digits. (I progressively refined the range of $x$ so that $a_n$ stays positive for a longer time.) Again, will it ever have a chance to be proved?

My original suspicion was that we may rearrange the recurrence relation to obtain continued fraction, but it was of no avail. To be honest, I have never seen this type of problem, and will be glad if I can learn anything new about it.

Question 3. Given that the above question seems to bold to answer, perhaps we may consider its variants:

  1. (Variant 1) $a_0 = 0$, $a_1 = x$, and $a_{n+1} = \frac{n}{a_n} - a_n - p a_{n-1}$, where $p \in \mathbb{R}$.

  2. (Variant 2) $a_0 = 0$, $a_1 = x$, and $a_{n+1} = \frac{1}{a_n} - a_n - a_{n-1}$.

  3. (Variant 3) $a_0 = 0$, $a_1 = x$, and $a_{n+1} = \frac{n^2}{a_n} - a_n - a_{n-1}$.

Again, in each case, numerical experiment suggests that there is a unique $x$ for which $(a_n)_{n\geq 1}$ stays positive. Moreover,

  • For Variant 1, it seems that $x = 1/\sqrt{3}$ for $p = -2$ but I have no guess for general $p$, even when it is an integer.

  • For Variant 2, it is conjectured that $x = 4/3\sqrt{3}$.

  • For Variant 3, we can check that $x = 1/\sqrt{3}$ is such one. Indeed, we find that $a_n = n/\sqrt{3}$ solves the recurrence relation.

Then we may ask whether the version of Question 1-2 can be proved for these variants.


Progress.

  1. I managed to answer Question 1. Check this answer.

In the first part, I answer Question 2: I prove that the recursion $$\label{rec}\tag{1}a_{n+1}=\frac n{a_n}-a_n-a_{n-1}$$ yields a positive sequence for the initial values $a_0=0$, $a_1=2\Gamma(\frac34)/\Gamma(\frac14)$.

(\ref{rec}) is actually a special discrete Painlevé 1 equation. One survey article mentioned this article by J. Shohat about orthogonal polynomials in which the recursion first appeared. (See also this preprint which I found after completing my proof). The following proof is inspired by Shohat's article. It also contains proofs of some well known facts about orthogonal polynomials to be self-contained.

Proof: Consider the inner product $(p,q)=\int_{-\infty}^\infty e^{-\frac14x^4}p(x)q(x)\,dx$ on the real vector space of all polynomials. Since the subspaces of all polynomials of degree $\leq n$ have dimension $n+1$, there is, for $n\geq1$, a unique polynomial $P_n(x)=x^n+...$ such that $(P_n,q)=0$ for all polynomials of degree $<n$. For convenience, we put $P_0(x)=1$. Since $e^{-\frac14 x^4}$ is even, we have $P_n(x)=(-1)^nP_n(-x)$ for all $n$: $P_n$ is even or odd if $n$ is even or odd, respectively. Parity will be used in the sequel without mentioning it.

Claim 1: There are positive constants $\lambda_n$ such that $$\label{eqa}\tag{2}P_{n+1}(x)-x\,P_n(x)+\lambda_n P_{n-1}(x)=0\mbox{ for }n\geq1.$$

Proof: $P_{n+1}(x)-x\,P_n(x)$ has degree $<n$ and it is orthogonal to all polynomials $q$ of degree $<n-1$, because $(xP_n,q)=(P_n,xq)=0$. Hence there is a constant $\lambda_n$ such that $P_{n+1}(x)-x\,P_n(x)=-\lambda_nP_{n-1}(x)$. This constant is positive because $$\lambda_n(P_{n-1},P_{n-1})=(\lambda_nP_{n-1},P_{n-1})=(xP_n,P_{n-1})=(P_n,xP_{n-1})=(P_n,P_n)$$ and hence $$\label{eqlam}\tag{3}\lambda_n=(P_n,P_n)/(P_{n-1},P_{n-1})\mbox{ for }n\geq1.$$

We also introduce, for $n\geq2$, the coefficient of $x^{n-2}$ in $P_n$ and name it $d_n$. The relation (\ref{eqa}) implies by induction that $$d_n=-(\lambda_1+\cdots+\lambda_{n-1}).$$ Now we can write, for $n\geq0$, $$\label{eqb}\tag{4}x^3P_n(x)=P_{n+3}(x)+h_nP_{n+1}(x)+\mbox{ terms of degree below } n.$$ Comparing the coefficients of $x^{n+1}$ shows that the constant $h_0=\lambda_1+\lambda_2$ whereas $h_1=-d_4=\lambda_1+\lambda_{2}+\lambda_{3}$ and $$h_n=d_n-d_{n+3}=\lambda_n+\lambda_{n+1}+\lambda_{n+2}\mbox{ for }n\geq2.$$

Now we multiply both sides of (\ref{eqb}) by $P_{n+1}$ and obtain $(x^3P_n,P_{n+1})=h_n(P_{n+1},P_{n+1})$ for $n\geq0$. At this point, we use the special form of our weight $e^{-\frac14 x^4}$ - so far, we just used that it is even. We calculate $$(x^3P_n,P_{n+1})=\int_{-\infty}^\infty \left(e^{-\frac14 x^4}x^3\right) P_n(x)P_{n+1}(x)\,dx=\int_{-\infty}^\infty e^{-\frac14 x^4}(P_nP_{n+1})'(x)\,dx $$ and hence $(x^3P_n,P_{n+1})=(P_n',P_{n+1})+(P_n,P_{n+1}')=(n+1)(P_n,P_n)$. This yields together with (\ref{eqlam}) $$n+1=(\lambda_n+\lambda_{n+1}+\lambda_{n+2})\lambda_{n+1}\mbox{ for }n\geq1,$$ whereas $1=(\lambda_1+\lambda_2)\lambda_1$. If we put $\lambda_0=0$ for convenience, we have $$n=(\lambda_{n-1}+\lambda_n+\lambda_{n+1})\lambda_n\mbox{ for }n\geq1.$$ Together with $\lambda_0=0$, we have a sequence $(\lambda_n)_{n\geq1}$ of positive numbers as asked in the OP. Now by (\ref{eqlam}) finally $\lambda_1=(x,x)/(1,1)=2\Gamma(\frac34)/ \Gamma(\frac14)$ because $(1,1)=\int_{-\infty}^{\infty}e^{-\frac14 x^4}\,dx=2^{-1/2}\Gamma(\frac14)$ and $(x,x)=\int_{-\infty}^{\infty}e^{-\frac14 x^4}x^2\,dx=2^{1/2}\Gamma(\frac34)$. This completes the proof.

In part 2, we prove that for the recursion from Question 3, Variant 2, there exists a unique value $x>0$ such that the sequence determined by the initial condition $a_0=0$, $a_1=x$ remains positive for all positive $n$ and that the value of this $x$ is $\frac4{3\sqrt3}$.

It is more convenient to work with the sequences $(b_n)$ determined by $a_n=\frac1{\sqrt3}b_n$. They satisfy the recursion $$\label{rec2}\tag{5} 3=(b_{n+1}+b_n+b_{n-1})b_n\mbox{ for }n\geq1.$$

Uniqueness: Any positive sequence $(b_n)$ satisfying (\ref{rec2}) obviously satisfies $b_n\leq\sqrt3$ for all $n$. Using the recursion in the form $b_n=3/(b_{n+1}+b_n+b_{n-1})$ now yields that $b_n\geq1/\sqrt3$ for $n\geq 1$. Now $b_n^2+b_{n+1}b_n\leq3$ for $n\geq1$ yields that $b_n\leq B$ for $n\geq1$, where $B$ is the positive solution of $B^2+3^{-1/2}B=3$. In particular $B<\sqrt3$.

Suppose now that $(b_n)$ and $(b_n')$ are two positive sequences satisfying (\ref{rec2}). Then, as seen above $1/\sqrt3\leq b_n,b_n'\leq B<3$ for $n\geq1$. Now put $d_n=b_n'-b_n$ for $n\geq0$. Then $d_0=0$. We assume that $d_1\neq0$. The sequence $(d_n)$ satisfies a recursion obtained by taking the difference of those for $(b_n)$ and $(b_n')$. It is $$\label{recd}\tag{6}d_{n+1}=-\left(\frac3{b_nb_n'}+1\right)d_n-d_{n-1}.$$ Hence we have recursive inequalities $$|d_{n+1}|\geq\left(\frac3{b_nb_n'}+1\right)|d_n|-|d_{n-1}|\mbox{ for }n\geq1.$$ These allow to prove by induction that $$|d_{n+1}|\geq \frac3{b_nb_n'}|d_n|\geq|d_n|\mbox{ for }n\geq1.$$ Again by induction, it follows that $|d_n|\geq \left(\frac3{B^2}\right)^{n-1}|d_1|$ for all $n\geq1.$ Since $B^2<3$, this contradicts the fact that all $|d_n|\leq B-3^{-1/2}$. Hence the assumption $d_1\neq0$ was false and there is at most one positive sequence satisfying (\ref{rec2}).

Existence, first proof: Here we consider every element $b_n=b_n(x)$ of the sequence satisfying (\ref{rec2}) as a (rational) function of the initial value $b_1(x)=x$. We show

Claim 2: There exist a sequence $(I_n)_{n\geq1}$ of nested compact intervals (that is $I_{n+1}\subset I_n$) such that
a) $b_k(I_n)\subset[3^{-1/2},3^{1/2}]$ for $1\leq k\leq n$.
b) $b_n(I_n)=[3^{-1/2},3^{1/2}]$ for all $n\geq1$.
Since the intersection $\bigcap_{n\geq1}I_n$ of nested compact intervals is nonempty, it contains some $x$ such that $b_n(x)>0$ for all $n\geq1$. Thus Claim 2 implies the existence of such an $x$.

Proof of Claim 2: By induction. For $n=1$, we simply choose $I_1=[3^{-1/2},3^{1/2}]$. Suppose now that we have found $I_1,\dots,I_N$ such that a), b) hold for $1\leq k\leq n\leq N$. Then there exist $t, T\in I_N$ such that $b_N(t)=3^{-1/2}$, $b_N(T)=3^{1/2}$ and $b_{N-1}(t)\leq 3^{1/2}$, $b_{N-1}(T)\geq 3^{-1/2}$. This leads to $b_{N+1}(t)=3/b_N(t)-b_N(t)-b_{N-1}(t)\geq 3^{3/2}-3^{-1/2}-3^{1/2}>3^{1/2}$ and $b_{N+1}(T)=3/b_N(T)-b_N(T)-b_{N-1}(T)=-b_{N-1}(T)<0$. We assume $t<T$; in the opposite case the considerations are analogous. Now we apply the intermediate value theorem: We choose $s\in[t,T]$ maximal such that $b_{N+1}(s)=3^{1/2}$. Then $b_{N+1}(\tau)<3^{1/2}$ for $s<\tau\leq T$. Now we can choose $S\in [s,T]$ minimal with $b_{N+1}(S)=3^{-1/2}$. Then $S>s$ and $3^{-1/2}<b_{N+1}(\tau)<3^{1/2}$ for $s<\tau<S$. If we put $I_{N+1}=[s,S]\subset I_N$ then a), b) hold for $1\leq k\leq n\leq N+1$. This completes the proof of Claim 2.

Existence, second proof. Here we show that $b_n$, $n\geq1$ are positive if $b_1=4/3$. This proves the conjecture for Variant 2. The recursion (\ref{rec2}) shows that all $b_n$ are rational, we find for the first $b_n$. $$b_2=\frac{11}{12}, b_3=\frac{45}{44}, b_4=\frac{164}{165}, b_5=\frac{616}{615}.$$ This suggests

Claim 3: $b_n=1+1/d_n$, where $d_{n+1}=-4d_n-d_{n-1}-1$ for $n\geq1$ and $d_0=-1$, $d_1=3$.

This Claim implies, of course, that all $b_n$, $n\geq1$ are positive.

Proof of Claim 3: We consider the sequence $d_n$, $n\geq0$ of integers recursively defined as above. We first show $$\label{rel}\tag{7}d_{n-1}d_{n+1}=d_n+d_n^2\mbox{ for }n\geq1.$$ To show (\ref{rel}), we proceed by induction. For $n=1$, it is true. If it is true for some $n$, we calculate $$\begin{array}{rcl} d_nd_{n+2}-d_{n+1}-d_{n+1}^2&=&d_n(-4d_{n+1}-d_n-1)-d_{n+1}-d_{n+1}^2\\ &=& d_{n+1}(-4d_n-d_{n+1}-1)-d_n-d_n^2=d_{n+1}d_{n-1}-d_n-d_n^2=0. \end{array} $$

Now we put $b_n=1+\frac1{d_n}$. If we want to prove that they satisfy (\ref{rec2}), we actually have to show that $$\frac1{d_{n+1}}=-\frac3{d_n+1}-\frac1{d_n}-\frac1{d_{n-1}}\mbox{ for }n\geq1.$$

To show this, we calculate using (\ref{rel}) and the recursion for the $d_n$ $\newcommand{\ds}{\displaystyle}$ $$\begin{array}{rcl}\ds-\frac3{d_n+1}-\frac1{d_n}-\frac1{d_{n-1}}&=& \ds\frac{-4d_nd_{n-1}-d_{n-1}-d_n-d_n^2}{d_n(d_n+1)d_{n-1}}\\ &=&\ds\frac{d_{n-1}(d_{n+1}+d_{n-1})-d_{n-1}d_{n+1}}{d_{n+1}d_{n-1}^2} =\ds\frac1{d_{n+1}}.\end{array}$$ This completes the proof.

In part 3, I consider Variant 1 and prove that, for any real $p$, there exists a unique value $x>0$ such that the recursion \begin{equation}\label{eq3}\tag{8}a_{n+1}=\frac n{a_n}-a_n-p\,a_{n-1} \mbox{ for }n\geq1\end{equation} yields a positive sequence for the initial values $a_0=0$, $a_1=x$ and that $x=1/\sqrt{3}$ for $p=-2$.

Existence: We will use repeatedly that for any real $z$ and positive integer $n$, the equation $\frac ny-y=z$ has exacty one positive solution. It can be given explicitly as $y=-\frac z2+ \sqrt{\frac{z^2}4+n}$.

We first prove
Lemma 1: There exist two sequences $L_n,U_n$, $n\geq0$ such that $L_0=U_0=0$, $0<L_n<U_n$ for all $n\geq1$ and $$\frac n {U_n}-U_n-p t\leq0\mbox{ for all }n\geq1\mbox{ and }t\in[L_{n-1},U_{n-1}],$$ $$\frac n {L_n}-L_n-p t\geq U_{n+1}\mbox{ for all }n\geq1\mbox{ and }t\in[L_{n-1},U_{n-1}].$$ Proof: We have to distinguish the cases: $p\geq0$ and $p<0$.
In the case $p\geq0$, we choose $U_n=\sqrt{n}$ for all $n$. Then the first inegualities is satisfied whatever $L_n$ we choose. The second inequalities are satisfied if we choose as $L_n$ the unique positive solution of $\frac n{L_n}-L_n=U_{n+1}+p\,U_{n-1}$.
In the case $p<0$, we choose recursively $U_n$ as the unique positive solution of $\frac n{U_n}-U_n=p\,U_{n-1}$. Again, the first inequalities are satisfied whatever we choose for $L_n$. The second inequalities are now satisfied if we choose recursively $L_n$ as the unique positive solution of $\frac n{L_n}-L_n=U_{n+1}+p\,L_{n-1}$.

Here again, we consider every element $a_n=a_n(x)$ of the sequence satisfying (\ref{eq3}) as a (rational) function of the initial value $a_1(x)=x$. Using Lemma 1, we can now show in a way identical to Claim 2:

Claim 4: There exist a sequence $(I_n)_{n\geq1}$ of nested compact intervals such that
a) $a_k(I_n)\subset[L_k,U_k]$ for $1\leq k\leq n$.
b) $a_n(I_n)=[L_n,U_n]$ for all $n\geq1$.
Since the intersection $\bigcap_{n\geq1}I_n$ of nested compact intervals is nonempty, it contains some $x$ such that $a_n(x)>0$ for all $n\geq1$. Thus Claim 4 implies the existence of such $x$.

Observe that in the case $p=-2$, we can simply choose $a_n=n/\sqrt{3}$ and recursion (\ref{eq3}) is satisfied.

Uniqueness: In the case $q=-p>0$, use $a_{n+1}a_n+a_n^2=n+q\,a_na_{n-1}$ in two ways. First we estimate $$a_n^2\leq n+qa_na_{n-a}\leq n+\frac12a_n^2+\frac{q^2}2a_{n-1}^2,$$ hence \begin{equation}\label{est1}\tag{9}a_n^2\leq 2n+ q^2 a_{n-1}^2.\end{equation} Then, we estimate using (\ref{est1}) $$n\leq a_n^2+a_na_{n+1}\leq2a_n^2+\frac14a_{n+1}^2\leq \left(2+\frac{q^2}4\right)a_n^2+\frac {n+1}2$$ and find that there is a constant $c$ such that \begin{equation}\label{unt1}\tag{10}a_n\geq c\sqrt{n}\mbox{ for }n\geq1.\end{equation}

Now we distinguish 3 subcases:
If $q>2$ then the equation $t^2+t=q$ has exactly one positive solution $t=\mu>1$. The negative solution is $t=-\mu-1$. Therefore, we rewrite the inequality following from (\ref{unt1}): $a_{n+1}+a_n-qa_{n-1}=\frac n{a_n}\leq \frac1c\sqrt n$ as $$(a_{n+1}+(\mu+1)a_n)-\mu(a_n+(\mu+1)a_{n-1})\leq\frac1c\sqrt n$$ and conclude that $$a_{n}+(\mu+1)a_{n-1}\leq \mu^{n-1}a_1 +\frac1c\sum_{j=1}^{n-1}\mu^{n-1-j}\sqrt j\leq C \mu^n,$$ where $C=\frac1\mu a_1+\frac1{c\mu}\sum_{j=1}^\infty\sqrt j\mu^{-j}$.

If $q=2$ then we obtain $\mu=1$ and in the same way that $a_n+2a_{n-1}\leq C n^{3/2}$ with some constant $C$. If $0<q<2$ then the equation $t^2+t=q$ has exactly one positive solution $t=\mu<1$ and the negative solution is again $t=-\mu-1$. We conclude as above that there is a constant $C$ such that $a_n+(\mu+1)a_{n-1}\leq C \sqrt{n}$.

Altogether, we found that for all $q$ and every solution of (\ref{eq3}) there is a constant $C$ such that $a_n\leq C n^{3/2}\max(1,\mu)^n$, where $\mu$ is the positive solution of $t^2+t=q$.

Now if $a_n$, $a_n'$, $n\geq0$ are two positive solutions of (\ref{eq3}) then the sequence $d_n=a_n-a_n'$ satisfies $d_0=0$ and $$d_{n+1}=-\left(\frac{n}{a_na_n'}+1\right)d_n+qd_{n-1}\mbox{ for }n\geq1.$$ Since $q>0$, the sequence $d_n$ is alternating and we have $$|d_{n+1}|=\left(\frac{n}{a_na_n'}+1\right)|d_n|+q|d_{n-1}|\geq2|d_n|+q|d_{n-1}| \mbox{ for }n\geq1.$$

Using the unique solution $\lambda>2$ of $t^2=2t+q$, we rewrite this as $$|d_{n+1}|+(\lambda-2)|d_n|\geq \lambda\, (|d_{n}|+(\lambda-2)|d_{n-1}|)\mbox{ for }n\geq1.$$ This implies by induction that $|d_{n}|+(\lambda-2)|d_{n-1}|\geq \lambda^{n-1}|d_1|$ and hence also $|d_n|\geq\lambda^{n-1}|d_1|/(\lambda-1)$. Now the previous considerations show that there is a constant $C$ such that $|d_n|=|a_n-a_n'|\leq C n^{3/2}\max(1,\mu)^n$ where $\mu$ is the positive solution of $t^2+t=q$. Since $\max(1,\mu)<\lambda$, the assumption $|d_1|>0$ would lead to a contradiction. Thus $d_1=0$, hence all $d_n=0$ and $a_n=a_n'$ for all $n$. This proves uniqueness in the case $q=-p>0$.

The proof of the uniqueness of $x$ in the case $p>0$ is very different. We will use as an essential tool the function $w(n,z)$ defined for real $z$ and positive integer $n$ as the unique positive solution $w$ of $\frac nw-w=z$. It can be given explicitly as \begin{equation}\nonumber w(n,z)=-\frac z2+\sqrt{\frac{z^2}4+n}=\frac n{\frac z2+\sqrt{\frac{z^2}4+n}}. \end{equation} Observe that for any positive $n$, the mapping $z\to w(n,z)$ is strictly decreasing because the derivative of the mapping $w\to\frac nw-w$ is always negative.

Step 1: Consider now a sequence $a_n$, $n=0,1,\dots$, verifying (\ref{eq3}) for some parameter $p\geq0$. Note that we do not indicate the dependence upon $p$ of most objects below with the exception of some ``constants'' in step 4.

We have $a_{n+1}a_n+a_n^2+pa_{n-1}a_n=n$ for $n\geq1$. Hence \begin{equation} \label{ineqbas}\tag{11}a_n\leq\sqrt n\mbox{ and }a_{n-1}a_n\leq\frac np\mbox{ for }n\geq1. \end{equation} Using the sequence $U_1(n)=\sqrt{n}$, we have $0\leq a_n\leq U_1(n)$ for all $n$. Now define $L_1(n)$ by $L_1(0)=0$ and $L_1(n)=w(n,U_1(n+1)+pU_1(n-1))$ for $n\geq1$. Since $a_{n+1}+pa_{n-1}\leq U_1(n+1)+pU_1(n-1)$, we find that $a_n=w(n,a_{n+1}+pa_{n-1})\geq L_1(n)$ for all $n$. We have $0\leq L_1(n)\geq w(n,0)=U_1(n)$ for all $n$.

Next, define $U_2(0)=0$ and $U_2(n)=w(n,L_1(n+1)+pL_1(n-1))$ for positive $n$. Then $0\leq L_1(m)\leq a_m\leq U_1(m)$ for $m=n-1,n+1$ imply that $L_1(n)\leq a_n \leq U_2(n)\leq U_1(n)$ for all $n$. Continuing like this we define $L_2(0)=0$ and $L_2(n)=w(n,U_2(n+1)+pU_2(n-1))$ for positive $n$ and find $L_1(n)\leq L_2(n)\leq a_n \leq U_2(n)$ for all $n$.

In the same way, we define the sequences $U_k(n)$, $L_k(n)$, $n=0,1,...$ satisfying \begin{equation}\nonumber U_{k+1}(n)=w(n,L_k(n+1)+pL_k(n-1))\mbox{ and } L_k(n)=w(n,U_k(n+1)+pU_k(n-1)) \end{equation} and $L_k(n)\leq L_{k+1}(n)\leq a_n \leq U_{k+1}(n)\leq U_k(n)$ for all $n$ and every positive sequence $a_n$ satisfying (\ref{eq3}).

Finally, we consider the pointwise limits \begin{equation}\nonumber U(n)=\lim_{k\to\infty}U_k(n)\mbox{ and } L(n)=\lim_{k\to\infty}L_k(n) \end{equation} which exist because for fixed $n$, the sequences $U_k(n)$, $L_k(n)$, $k=1,2,...$ are monotonous and bounded. The properties of the sequences $U_k$, $L_k$ imply besides $U(0)=L(0)=0$
a) $L(n)\leq a_n\leq U(n)$ for every $n$ and every positive sequence $a_n$ satisfying (\ref{eq3}),
b) $U(n)=w(n,L(n+1)+pL(n-1))$ and $L(n)=w(n,U(n+1)+pU(n-1))$ for all positive $n$.
As a consequence of b), the two sequences $A_n,B_n$, $n=0,1,...$, defined by $A_n=U(n),\,B_n=L(n)$ if $n$ is even and $A_n=L(n),\,B_n=U(n)$ if $n$ is odd both satisfy the recursion (\ref{eq3}). The uniqueness of $x$ defining a positive sequence via recursion (\ref{eq3}) is proved once we show
Claim 5: $L(n)=U(n)$ for all $n$ or, equivalently, $A_n=B_n$ for all $n$.

Observe that the above construction of $L(n)$ and $U(n)$ can be used to approximate the unique positive sequence $a_n$ satisfying (\ref{eq3}). For $p=1,3,10$, we find \begin{equation}\nonumber \begin{array}{|c|c|c|c|c|c|c|c|c|c|c|}n&1&2&3&4&5&6&7&8&9&10\\\hline p=1&0.6760&0.8034&1.010&1.156&1.294&1.416&1.529&1.634&1.733&1.827\\ \hline p=3&0.7671&0.5365&0.8900&0.8713&1.050&1.099&1.210&1.277&1.360&1.427\\ \hline p=10&0.9066&0.1964&0.9192&03804&0.9443&0.5470&0.9798&0.6947&1.023&0.8243 \end{array} \end{equation} This sequence $a_n$, $n=0,1,...$ is not monotonous for small $n$ unless $p$ is small. This contributes to the difficulty of proving the uniqueness.

Step 2 In order to prove the Claim 5, i.e. uniqueness, consider the non-negative sequence $D_n=(-1)^n(A_n-B_n)$. It satisfies $D_0=0$ and \begin{equation}\label{eqD}\tag{12} D_{n+1}=\left(\frac n{A_nB_n}+1\right)D_n-p\,D_{n-1}\mbox{ for }n\geq1. \end{equation} The subtraction makes the present case $p\geq0$ harder than the previous one $p<0$, in particular for large $p$. For small $p$, things are easy. It is sufficient to use $$D_{n+1}\geq 2D_n-p\,D_{n-1}$$ which follows from (\ref{ineqbas}) and (\ref{eqD}).
If $0\leq p<1$, then using the solution $\lambda\in]1,2]$ of $\lambda=2-\frac p\lambda$, we can show by induction that $D_{n+1}\geq\lambda D_n$ for all $n\geq1$. Indeed, this inequality is true for $n=1$ and if we have $D_{n}\geq\lambda D_{n-1}$, then $D_{n-1}\leq \frac1\lambda D_n$ and hence $$D_{n+1}\geq 2D_n-p\,D_{n-1}\geq\left(2-\frac p\lambda\right)D_n=\lambda D_n.$$ As a consequence, we find for all $n\geq1$ that $D_n\geq \lambda^{n-1} D_1$ which contradicts $D_n=|A_n-B_n|\leq\sqrt n$ unless $D_1=0$ (yielding $A_n=B_n$ for all $n$).
If $p=1$, we prove similarly that $D_{n+1}\geq\frac{n+1}n D_n$ for all $n\geq1$ and hence $D_n\geq nD_1$ again contradicting $D_n\leq\sqrt n$ unless $D_1=0$.
For $p>1$, we have to work considerably harder to prove uniqueness.

Step 3 We prove some auxiliary statements improving (\ref{ineqbas}). These are valid for any positive sequence $a_n$ satisfying (\ref{eq3}). \begin{equation} \label{anbelow}\tag{13} a_n\geq \frac1{r(p)}\sqrt n,\mbox{ for all }n\geq1\mbox{ and }p\geq1, \mbox{ where }r(p)=1/w(1,p+1). \end{equation} Proof: We have \begin{equation}\nonumber \frac n{a_n}-a_n=a_{n+1}+pa_{n-1}\leq\sqrt{n+1}+p\sqrt{n-1}\leq (p+1)\sqrt n \end{equation} since $\sqrt{n+1}+\sqrt{n-1}\leq2\sqrt n$. Hence $b_n=a_n/\sqrt n$ satisfies $\frac1{b_n}-b_n\leq p+1$ and hence $b_n\geq w(1,p+1)=1/r(p)$. \begin{equation} \label{anabove}\tag{14} a_n\leq\frac1{q(p)}\frac n{\sqrt{n-1}}\mbox{ for all }n\geq2,\,p\geq1,\mbox{ where } q(p)=1/w(1,(p+1)/r(p)). \end{equation} Proof: We have using (\ref{anbelow}) \begin{equation}\nonumber \frac n{a_n}-a_n=a_{n+1}+pa_{n-1}\geq \frac1 {r(p)}(\sqrt{n+1}+p\sqrt{n-1}) \geq\frac{p+1}{r(p)}\sqrt{n-1}. \end{equation} Thus $a_n\leq w(n,\frac{p+1}{r(p)}(n-1))\leq\frac n{\sqrt{n-1}}w(1,\frac{p+1}{r(p)}).$

Observe that $r(p)$ and $q(p)$ are increasing with $p$. Here we use that $\frac{p+1}{r(p)}=1/\left[\frac12+\sqrt{\frac14+\frac 1{(p+1)^2}}\right]$. \begin{equation} \label{anan-1}\tag{15} a_na_{n-1}\leq \frac n{t(n,p)}\mbox{ for all }n\geq3,p\geq1,\mbox{ where } t(n,p)=\frac p2+\sqrt{\frac{p^2}4+\frac{n(n-2)}{(n-1)^2}q(1)^2}. \end{equation} Proof: We have $a_n^2+pa_{n-1}a_n\leq n$, hence \begin{equation}\nonumber a_n\leq -\frac p2 a_{n-1}+\sqrt{\frac{p^2}4a_{n-1}^2+n} =\frac n{\frac p2 a_{n-1}+\sqrt{\frac{p^2}4a_{n-1}^2+n}}. \end{equation} Thus \begin{equation}\nonumber a_na_{n-1}\leq \frac n{\frac p2+\sqrt{\frac{p^2}4+\frac n {a_{n-1}^2}}}. \end{equation} The rest follows using (\ref{anabove}): $\frac n{a_{n-1}^2}\geq n q(p)^2\frac{n-2}{(n-1)^2} \geq\frac{n(n-2)}{(n-1)^2}q(1)^2$. Note that $q(1)\geq 1.4966$.

For $n=2$, the same proof shows using $a_1\leq1$ that \begin{equation}\label{a2a1}\tag{16} a_2a_1\leq \frac 2{t(2,p)}\mbox{ where } t(2,p)=\frac p2+\sqrt{\frac{p^2}4+2}. \end{equation} Observe that $t(n,p)$ increases with $p$ and also increases with $n\geq3$.

Step 4 Assume that $p\geq1$ and that we do not have uniqueness. Then $A_n\neq B_n$ for all $n\geq1$. Otherwise, that is if $A_n=B_n$ for some $n\geq1$ then in the case $n=1$ we of course have $A_n=B_n$ for all $n$ by the recursion. In the case $n>1$ we have by construction $pA_{n-1}+A_{n+1}=pB_{n-1}+B_{n+1}$ and hence $A_{n-1}=B_{n-1}$ and $A_{n+1}=B_{n+1}$ because the differences $A_{n-1}-B_{n-1}$ and $A_{n+1}-B_{n+1}$ cannot have opposite sign by construction. This leads to $A_n=B_n$ for all $n$ also in the second case.

The recursion (\ref{eqD}) indicates that $D_{n+1}/D_n$ might be large if $A_nB_n$ is small. This suggests to introduce the sequence $F_n=A_nB_n\frac{D_{n+1}}{D_n}$, $n\geq1$, where again $D_n=(-1)^n(A_n-B_n)$. We show later
Lemma 2: We have $F_n\geq\frac12n$ for all $n\geq1$.
If the Lemma is proved, Claim 5 follows readily. Using the definition of $F_n$ and (\ref{anabove}), we find that $D_{n+1}/D_n\geq\frac{n-1}{2n}q(p)^2\geq\frac{n-1}{2n}q(1)^2\geq\frac{n-1}{2n}\cdot2.23$ and this is larger than $C:=1.0035$ if $n\geq10$. Therefore $D_n\geq C^{n-10}D_{10}$ for $n\geq 10$ contradicting $D_n=|A_n-B_n|\leq \sqrt n$. Thus the assumption $A\neq B$ must have been false and Claim 5 is proved.

Proof of Lemma 2: First by (\ref{eqD}), we have $F_1=A_1B_1D_2/D_1=A_1B_1+1$. We estimate $A_1$ using $\frac1{A_1}-A_1=A_2\leq\sqrt2$ and obtain $A_1\geq w(1,\sqrt2)$. We have as well $B_1\geq w(1,\sqrt2)$. We conclude that $F_1\geq1+w(1,\sqrt2)^2=:C_1\geq1.267$.

We have by (\ref{eqD}) \begin{equation}\label{eqF}\tag{17} F_n=n+A_nB_n-\frac {pA_nB_nA_{n-1}B_{n-1}} {F_{n-1}} \end{equation}

For $n=2$, we find $$\begin{array}{crlcl}F_2&=&2+A_2B_2-\frac {pA_2B_2A_{1}B_{1}} {F_{1}}\\ &\geq& 2+A_2B_2A_1B_1-\frac {pA_2B_2A_{1}B_{1}} {F_{1}} &\geq& 2+pA_2B_2A_{1}B_{1}\left(\frac1p-\frac1{F_1}\right) .\end{array}$$ If $p\leq F_1$, then we find that $F_2\geq2$. Otherwise, we use (\ref{a2a1}) and find $$F_2\geq 2+\frac {4p}{t(2,p)^2}\left(\frac1p-\frac1{F_1}\right)\geq 2+\frac {4}{t(2,p)^2}-\frac {4p}{t(2,p)^2C_1}.$$ In order to minimize the right hand side it is convenient to use $t=t(2,p)$ as independent variable and replace $p=t-\frac2t$. Thus we have to minimize $$g(t)=2+\frac4{t^2}-\frac4{C_1t}+\frac8{C_1t^3}.$$ This is a polynomial of degree 3 in the variable $s=1/t$ and can easily be minimized for positive $s$ using elementary calculus. Observe that the derivative with respect to $s$ is negative for $s=0$ and strictly increasing. Therefore there is a unique minimum on the set of all $s\geq0$. We find that $F_2\geq C_2:=1.559$.

For $n=3$, we find in the same way $F_3\geq 3+pA_3B_3A_{2}B_{2}\left(\frac1{2p}-\frac1{F_2}\right)$ and either $F_3\geq3$ in case $p\leq F_2/2$ or else using (\ref{anan-1}) $$F_3\geq 3+\frac{9}{2t(3,p)^2}-\frac{9p}{C_2t(3,p)^2}.$$ To minimize the right hand side, we use again $t=t(3,p)$ as independent variable and replace (see (\ref{anan-1})) $p$ by $p=t-\frac34\frac{q(1)^2}{t}$. Thus we have to minimize here $$g(t)=3+\frac9{2t^2}-\frac9{C_2t}+\frac{27q(1)^2}{4C_2t^3}.$$ Here, we find $F_3\geq C_3=1.931.$ Thus we have shown $F_n\geq\frac n2$ for $n=1,2,3.$

For $n\geq4$, we proceed analogously for the inductive step. So we assume that $F_{n-1}\geq\frac12(n-1)$. First we use (\ref{eqF}), estimate using (\ref{anabove}) that $1\geq\frac{n-2}{(n-1)^2}q(p)^2A_{n-1}B_{n-1}$ and hence with $q(p)\geq q(1)$ $$F_n\geq n + A_nB_nA_{n-1}B_{n-1}\left(\frac{n-2}{(n-1)^2}q(1)^2-\frac p{F_{n-1}}\right).$$ If the big parenthesis is positive, we are done. Otherwise, we use (\ref{anan-1}) and the induction hypothesis: $$F_n\geq n + \frac{n^2}{t(n,p)^2}\left(\frac{n-2}{(n-1)^2}q(1)^2-\frac{2p}{{n-1}}\right).$$ We obtain $F_n\geq n/2$ if and only if $$\frac12+\frac1{t(n,p)^2}\left(\frac{n(n-2)}{(n-1)^2}q(1)^2-\frac{2pn}{{n-1}}\right)\geq0$$ for all $n\geq 4$ and $p\geq1$. Again, if the big parenthesis is positive, there is nothing to prove. If it is negative, we can use that $t(n,p)$ increases with $n$ and then that the parenthesis becomes less negative with $n$. Therefore it is sufficient to prove the inequality for $n=4$ and all $p\geq1$. This can be done in the same way as before using $t=t(4,p)$ as independent variable and $p=t-\frac{8q(1)^2}{9t}$. So we have to minimize here $$g(t)=\frac12+\frac89 q(1^2)\frac1 t^2 - \frac8{3t}+\frac{64}{27}q(1)^2\frac1{t^3}$$ and check that the minimum is positive. We find as minimum $g(1/0.3028416...)=0.02248044...>0$. This completes the proof of the Lemma. Thus Claim 5 and hence uniqueness is proved also for $p>1$.