Q: There are two numerical sequence $X_n$ and $Y_n $. $X_n$ takes random integer from one to six for a given n. $Y_1=X_1$, and $$Y_n=X_n+\dfrac{1}{Y_{n-1}}$$. Find the probability $P$ that $$\dfrac{1+\sqrt3}{2}\leq Y_n \leq 1+ \sqrt3$$ when n is very large.
I can calculate the limit if $X_n$ is constant. But have no idea how to deal with the random number.
Thanks in advance.
Let $Q(x)$ be the probability that $1/Y_n\leq x$ for large $n$. Then, since $n$ is large, $Q(x)$ is also the probability that $1/Y_{n+1}\leq x$ for large $n$, i.e. $Q(x) = P(1/Y_{n+1}\leq x)=P(X_n+1/Y_n\geq 1/x)$. Taking cases on $X_n$,
$$ Q(x) = \frac{1}{6}\left(P\left(1/Y_n\geq \frac{1}{x}-1\right)+P\left(1/Y_n\geq \frac{1}{x}-2\right)+\dots+P\left(1/Y_n\geq \frac{1}{x}-6\right)\right)\\ =\frac{1}{6}\left(1-Q\left(\frac{1}{x}-1\right)+1-Q\left(\frac{1}{x}-2\right)+\dots+1-Q\left(\frac{1}{x}-6\right)\right)$$
Simplifying, $Q(x)+\sum_{i=1}^6 Q(1/x-i)=1$. Note that $Q(x)=0$ when $x\leq 0$ and $Q(x)=1$ when $x\geq 1$ so the only part of the sum that matters is when $i\leq\left\lfloor 1/x\right\rfloor$. We want to know the probability of $$\frac{(1+\sqrt{3})}{2}\leq Y_n\leq 1+\sqrt{3}\iff \frac{\sqrt{3}-1}{2}\leq \frac{1}{Y_n}\leq \sqrt{3}-1$$.
Let $a=(\sqrt{3}-1)/2$ and $b=\sqrt{3}-1$. Using the equation on $Q(a)$ and $Q(b)$, we get
$$ Q(a)+\frac{1}{6}+\frac{1}{6}Q(b)=1\\ Q(b)+\frac{1}{6}Q(a)=1$$
(This is so nice because coincidentally $1/a-2=b$ and $1/b-1=a$). Solving this system of equations yields $Q(a)=24/35$ and $Q(b)=31/35$. Hence, the solution is $Q(b)-Q(a)=\boxed{1/5}$.