10. The sequence of integers $\left\{a_{i}\right\}_{i=0}^{\infty}$ satisfies $a_{0}=3, a_{1}=4$, and
$$
a_{n+2}=a_{n+1} a_{n}+\left\lceil\sqrt{a_{n+1}^{2}-1} \sqrt{a_{n}^{2}-1}\right\rceil
$$
for $n \geq 0$. Evaluate the sum
$$
\sum_{n=0}^{\infty}\left(\frac{a_{n+3}}{a_{n+2}}-\frac{a_{n+2}}{a_{n}}+\frac{a_{n+1}}{a_{n+3}}-\frac{a_{n}}{a_{n+1}}\right) .
$$
Answer: $\frac{14}{69}$
The key idea is to note that $a_{n+1} a_{n}+\sqrt{a_{n+1}^{2}-1} \sqrt{a_{n}^{2}-1}$ is the larger zero of the quadratic
$$
f_{n}(x)=x^{2}-\left(2 a_{n+1} a_{n}\right) x+a_{n}^{2}+a_{n+1}^{2}-1 .
$$

Since $a_{n+2}$ is the smallest integer greater than or equal to this root, it follows that $a_{n}^{2}+a_{n+1}^{2}+$ $a_{n+2}^{2}-2 a_{n} a_{n+1} a_{n+2}-1$ is some small nonnegative integer. For these particular initial conditions $\left(a_{0}=3, a_{1}=4, a_{2}=12+\lceil\sqrt{120}\rceil=23\right)$, this integer is $\left(3^{2}+4^{2}\right)+\left(23^{2}-2 \cdot 3 \cdot 4 \cdot 23\right)-1=25-23-1=1$. We now use induction to prove both
$$
a_{n+3}=2 a_{n+2} a_{n+1}-a_{n} \text { and } a_{n}^{2}+a_{n+1}^{2}+a_{n+2}^{2}-2 a_{n} a_{n+1} a_{n+2}-1=1
$$
for $n \geq 0$. The base case is not difficult to check: $a_{3}=4 \cdot 23+\lceil\sqrt{7920}\rceil=181=2 \cdot 4 \cdot 23-3$, and the other equation has been checked above. Since the quadratic equation $f_{n+1}(x)=1$ has a solution $a_{n}$ by induction hypothesis. Then, using Vieta's theorem, $2 a_{n+1} a_{n+2}-a_{n}$ is also a solution. Then, the two roots of $f_{n+1}(x)=0$ must be in strictly between $a_{n}$ and $2 a_{n+1} a_{n+2}-a_{n}$, so we have that $a_{n+3} \leq 2 a_{n+1} a_{n+2}-a_{n}$ since $a_{n+3}$ is the ceiling of the larger root. In fact, since $a_{n+1} a_{n+2}$ is much larger than $a_{n}$ for $n \geq 1$ (it is not difficult to see that $a_{n}$ grows faster than exponential), meaning that the two roots of $f_{n+1}$ are more than 1 away from the minimum, and $f\left(2 a_{n+1} a_{n+2}-a_{n}\right)=1$, we have $f\left(2 a_{n+1} a_{n+2}-a_{n}-1\right)<0$, which mean that we must have $a_{n+3}=2 a_{n+1} a_{n+2}-a_{n}$, which simultaneously proves both statements due to Vieta jumping.
To finish, note that the above recurrence gives
$$
\frac{a_{n+3}}{a_{n+2}}-\frac{a_{n+2}}{a_{n}}=2 a_{n+1}-\frac{a_{n}}{a_{n+2}}-2 a_{n+1}+\frac{a_{n-1}}{a_{n}}=-\frac{a_{n}}{a_{n+2}}+\frac{a_{n-1}}{a_{n}},
$$
which telescopes with the other two terms. (Convergence can be shown since the ratio of adjacent terms is bounded above by $1 / 3$. In fact it goes to zero rapidly.) The only leftover terms after telescoping are $\frac{a_{3}}{a_{2}}-\frac{a_{2}}{a_{0}}=-\frac{a_{0}}{a_{2}}+\frac{a_{-1}}{a_{0}}=-\frac{3}{23}+\frac{1}{3}=\frac{14}{69}$, giving the answer. (Here, we use the backwards recurrence $a_{n-1}=2 a_{n} a_{n+1}-a_{n+2}$ to find $a_{-1}=2 \cdot 3 \cdot 4-23=1$.)