Limit of naturals at infinity and uniform continuity I need to prove the following:

Let $ f:\mathbb{R}\to\mathbb{R}$ be continuous.
$\lim_{n\to\infty}f(n) = \infty$, $n\in\mathbb{N}$.
Let $f$ be uniformly continuous, prove that $\lim_{x\to\infty}f(x)=\infty,\ x\in\mathbb{R}$

It's clear to me why uniform continuity is required, for example:

$f(x) = xsin(\frac{(4x-3)\pi}{2})$
$\forall n\in\mathbb{N},\ f(n) = n$

But clearly $f$ does not tend to infinity for all $x$.
I just can't get the uniform continuity into anything that will get me closer to solving this.
Help please!
 A: By uniform continuity of $f$ there exists $\delta > 0$ such that for all $x, y \in \mathbb R$, $|x - y| \leq \delta$ there holds $|f(x)-f(y)| \leq 1$. Define $M := \lceil \frac 1 \delta \rceil$. The idea is that any $x \in [n, n+1]$ (for $n \in \mathbb N$ arbitrary) is only a maximum of $M$ $\delta$-steps away from $n$, where $M$ is independent of $x$ and $n$. Thus, by uniform continuity, the distance between $f(x)$ and $f(n)$ is smaller than $M+1$. 
Formally: Let $K = \max \{k = 0, \ldots, M \mid n + \delta k \leq x \}$. Define $x_k := n + \delta k$ for $k = 0, \ldots, K$ and $x_{K+1} := x$. Then
$$ \begin{align}|f(n) - f(x)| &= |f(x_0) - f(x_{K+1}) | \\
&= |f(x_0) - f(x_1) + f(x_1) - f(x_2) + \ldots + f(x_{K}) - f(x_{K+1}) |\\ 
&\leq |f(x_0) - f(x_1)| + \ldots +| f(x_K) - f(x_{K+1}) |\\
& \leq K+1 \\
&\leq M+1
\end{align}$$
where the second last inequality follows because $|x_k - x_{k+1}| \leq \delta$ by definition and therefore $|f(x_k) - f(x_{k+1})| \leq 1$ by the uniform continuity.
For this reason $f(x_n) \to \infty$ for any sequence $x_n \to \infty$ by your requirement that $f(n) \to \infty$ for $n \to \infty$. Formally: Let $C>0$ be arbitrary. Because $f(n) \to \infty$ as $n \to \infty$ there exists $n_0 \in \mathbb N$ such that $f(n) \geq C+M$ for all $n \geq n_0$. Now let $(x_k)$ be a sequence such that $x_k \to \infty$. Then there is a $k_0 \in \mathbb N$ such that $x_k \geq N$ for all $k \geq n_0$. By our previous consideration there holds $\left| f(x_k) - f(\lfloor x_k \rfloor)\right| \leq M$, hence $f(x_k) \geq f(\lfloor x_k \rfloor) - M \geq C + M -M = C$.
