Let $f:\mathbb{R} \to \mathbb{R}$ such that, for all $n \in \mathbb{N}_{\geq 1}$, there exists $x_n$ such that $$|f(x)-f(x_n)| \leq \frac{1}{n}, \: \forall x>x_n$$ Prove that $f$ has a limit at infinity ( this limit may also be $\infty$)
I would like to know if my proof is correct. I did it by contradiction. Suppose that $f$ doesn't have a limit at infinity and let $a_n,b_n \to \infty$. Then let $l_1$ be a limit point of $(f(a_n))$ and $l_2$ be a limit point of $(f(b_n))$ such that $l_1 \neq l_2$. These limit points must exist, since otherwise $(f(a_n))$ and $f(b_n))$ would be convergent to the same limit. But $(a_n)$ and $(b_n)$ were randomly chosen, so this would mean that the limit of $f$ at infinity exists, contradiction.
Now, without loss of generality, suppose that the entire sequences $(f(a_n))$ an $(f(b_n))$ are convergent to these limits, since otherwise we could use another notation for their convergent subsequences. Since $a_n,b_n \to \infty$, there is $k_n \in \mathbb{N}_{\geq 1}$ such that $a_{k_n},b_{k_n}>x_n, \forall n \in \mathbb{N}_{\geq 1}$ and pick those numbers such that $k_{n+1}>k_n$. Hence $(a_{k_n})$ and $(b_{k_n})$ are subsequences of our sequences and moreover we have $|f(a_{k_n})-f(x_n)| \leq \frac{1}{n}$ and $|f(b_{k_n})-f(x_n)| \leq \frac{1}{n}$.
Taking limits when $n \to \infty$ in those inequalities gives $$\lim_{n \to \infty}f(x_n)=\lim_{n \to \infty}f(a_{k_n})=\lim_{n \to \infty}f(b_{k_n})=l_1=l_2$$ which is a contradiction. So $f$ must have a limit at infinity.