Find an "upper bound" for a given sequence. Let $a_1=5$ and let $$a_{n+1}=\frac{a_n^2}{a_n^2-4a_n+6}$$
Find the biggest integer $m$ not bigger than $a_{2018}$, that is $m\leq a_{2018}$.
My go:
Apparently the limit must satisfy $$l=\frac{l^2}{l^2-4l+6}\Leftrightarrow l=0\vee l=3\vee l=2$$ Computing first few terms i see that $a_n\to 3$ as $n\to\infty$. The sequence seems to converge to 3, so i tried to show that $\forall n\geq 2,a_n\leq3$ proceeding by induction, we find that $a_1=5,a_2=25/11\approx2,27\leq3$. Now let $a_n\leq 3\Rightarrow a_{n+1}=\frac{a_n^2}{a_n^2-4a_n+6}\leq\frac{9}{a_n^2-4a_n+6}$ but here I'm stuck again, no idea what to do with the denominator. Any help appreciated.

Alt. hint: quite obviously $\;a_n \ne 0\,$, then inverting both sides gives:
$$
\frac{1}{a_{n+1}}=1 - 4 \frac{1}{a_n} + 6 \frac{1}{a_n^2} \quad\iff\quad b_{n+1} = 6 b_n^2 - 4b_n + 1 \quad \style{font-family:inherit}{\text{where}} \;\; b_{n} = \frac{1}{a_n}
$$
Multiplying by $\,6\,$ then gives:
$$
6 b_{n+1} = 36 b_n^2 - 24b_n + 6 = (6 b_n - 2)^2+2 \quad\iff\quad c_{n+1} = c_n^2 \quad \style{font-family:inherit}{\text{where}} \;\; c_{n} = 6 b_n - 2
$$
Since $|c_1| = | 6 / a_1 - 2| = 4/5 \lt 1$ it follows that $\,c_n \to 0\,$ from above, so $\,a_n \to 3\,$ from below, then the same argument already made in other answers applies to show that $\,m = 2\,$.
