Cast a dice $n$ times. Denote by $X_1,\ X_2,\ \cdots ,\ X_n$ the numbers shown on each dice. Define $Y_1,\ Y_2,\ \cdots,\ Y_n$ by 
\[Y_1=X_1,\ Y_k=X_k+\frac{1}{Y_{k-1}}\ (k=2,\ \cdots,\ n)\]
Find the probability $p_n$ such that $\frac{1+\sqrt{3}}{2}\leq Y_n\leq 1+\sqrt{3}.$

35 points
1. **The Setup:**
   - We are given a sequence of random variables \(X_1, X_2, \ldots, X_n\) representing the outcomes of rolling a dice \(n\) times.
   - We define another sequence \(Y_1, Y_2, \ldots, Y_n\) by:
     \[
     Y_1 = X_1, \quad Y_k = X_k + \frac{1}{Y_{k-1}} \quad \text{for} \quad k = 2, \ldots, n
     \]
   - We need to find the probability \(p_n\) such that:
     \[
     \frac{1 + \sqrt{3}}{2} \leq Y_n \leq 1 + \sqrt{3}
     \]

2. **Initial Observations:**
   - Fact 1: \(Y_k \geq 1\) for all \(k\). This is because the minimum value of \(X_k\) is 1 and \(\frac{1}{Y_{k-1}} \geq 0\).
   - Fact 2: \(Y_n\) is never irrational. This follows from the fact that \(X_k\) are integers and \(\frac{1}{Y_{k-1}}\) is a rational number.

3. **Probability Analysis:**
   - For \(\frac{1 + \sqrt{3}}{2} \leq Y_n \leq 1 + \sqrt{3}\) to hold, \(X_n\) must be either 1 or 2.
   - Denote \(q_n\) as the probability that \(1 \leq Y_n \leq \frac{1 + \sqrt{3}}{2}\).

4. **Case Analysis:**
   - **Case 1: \(X_n = 1\)**
     - We need:
       \[
       \frac{\sqrt{3} - 1}{2} \leq \frac{1}{Y_{n-1}} \leq \sqrt{3}
       \]
     - Flipping the inequalities, we get:
       \[
       \frac{1}{\sqrt{3}} \leq Y_{n-1} \leq 1 + \sqrt{3}
       \]
     - The probability that \(Y_{n-1}\) lies in this range is \(p_{n-1} + q_{n-1}\).
     - Therefore, the probability for this case is:
       \[
       \frac{1}{6} (p_{n-1} + q_{n-1})
       \]

   - **Case 2: \(X_n = 2\)**
     - We need:
       \[
       \frac{1}{Y_{n-1}} \leq \sqrt{3} - 1
       \]
     - Flipping the inequality, we get:
       \[
       Y_{n-1} \leq \frac{1 + \sqrt{3}}{2}
       \]
     - The probability for this case is:
       \[
       \frac{1}{6} (1 - q_{n-1})
       \]

5. **Combining Cases:**
   - The total probability \(p_n\) is given by:
     \[
     p_n = \frac{1}{6} (p_{n-1} + q_{n-1}) + \frac{1}{6} (1 - q_{n-1})
     \]
   - Simplifying, we get:
     \[
     p_n = \frac{1}{6} (1 + p_{n-1})
     \]

6. **Initial Condition:**
   - For \(n = 1\), \(Y_1 = X_1\). The probability that \(X_1\) lies in the range \(\frac{1 + \sqrt{3}}{2} \leq X_1 \leq 1 + \sqrt{3}\) is:
     \[
     p_1 = \frac{1}{6}
     \]

7. **Solving the Recurrence:**
   - The recurrence relation is:
     \[
     p_n = \frac{1}{6} (1 + p_{n-1})
     \]
   - This can be solved iteratively or using standard methods for solving linear recurrence relations.

The final answer is \( \boxed{ p_n = \frac{1}{6} (1 + p_{n-1}) } \) with \(p_1 = \frac{1}{6}\).