Limit of an uniformly continuous function Suppose that an uniformly continuous function $f:[0, \infty) \rightarrow \mathbb{R}$ satisfies following: 
$\lim_{n \rightarrow \infty}f(n+x)=0$ for all $x \in [0,1]$. 
I want to prove that $\lim_{x \rightarrow \infty}f(x)=0$ holds. Although I know basic concepts of uniformly continuous function, I'm not sure how to approach this problem. I've seen a solution that uses some sets like $X(N, \epsilon)=\{x\in [0,1]:|f(n+x)|<\epsilon \forall n>N \}$ and shows that $X(N, \epsilon)$ is an open set (and since $[0,1]$ is a compact set there are finite sets $X(N_i, \epsilon)$s that cover $[0,1]$, and so on...), but I'm not sure how to prove those sets are open. Any helps would be greatly appreciated.
 A: $X(N,\epsilon)$ is, indeed, open. 
Let $x \in X(N,\epsilon)$. Since $f(x+n) \rightarrow 0$, we get that $\sup_{n>N} | f(n+x)| = \tilde{\epsilon} <\epsilon$
Since $f$ is uniformly continuous, we can choose $\delta$ such that $ |f(x)-f(y)| < \epsilon -\tilde{\epsilon}$ for all $x,y$ such that $|x-y|<\delta$.
Suppose $ x \in X(N,\epsilon)$, then $ ( x-\delta_1/2,x+\delta_1/2) \subset X(N,\epsilon)$, where $\delta_1$ is chosen such that $\delta_1 < \delta$ and $( x-\delta_1/2,x+\delta_1/2) \subset [0,1]$. Indeed, suppose $y \in ( x-\delta_1/2,x+\delta_1/2)$, then $|y-x|= |y+n-(x+n)|<\delta_1<\delta$ which implies 
\begin{align}
|f(y+n)|&\leq |f(y+n)-f(x+n)| +|f(x+n)|\\
&<\epsilon -\tilde{\epsilon}+ \tilde{\epsilon}\\
&=\epsilon.
\end{align}
The previous holds for all $n>N$, hence $y \in X(N,\epsilon)$
A: First show that $\lim_{n\to\infty} f(n + x) = 0$ uniformly over $x \in [0,1]$.
Let $\varepsilon > 0$. Since $f$ is uniformly continuous, there exists $\delta > 0$ such that $$|(n+x)-(n+y)|= |x - y| < \delta \implies |f(n + x) - f(n + y)| < \frac{\varepsilon}2$$
Now since $[0,1]$ is compact, finitely many open balls $B_1, B_2, \ldots, B_m$ of radius $\frac\delta2$ cover $[0,1]$.
Let $x \in B_i$. Since $f(n + x) \xrightarrow{n\to\infty} 0$, there exist $n_i \in \mathbb{N}$ such that $$n \ge n_i \implies |f(n + x)| < \frac\varepsilon2$$
Therefore, for any $y \in B_i$ and $n \ge n_i$ we have $|x - y| < \delta$ so
$$|f(n + y)| \le |f(n+x) - f(n+y)| + |f(n+x)| < \frac\varepsilon2+\frac\varepsilon2 = \varepsilon$$
Therefore, $f(x + n) \xrightarrow{n\to\infty} 0$ uniformly over $x \in B_i$ for every $i = 1, \ldots, m$.
Since there are only finitely many balls $B_i$, we conclude that $f(x + n) \xrightarrow{n\to\infty} 0$ uniformly over $x \in [0,1]$.
Now, let's show $\lim_{x\to\infty} f(x) = 0$. Let $\varepsilon > 0$. There exists $n_0 \in \mathbb{N}$ such that $$n \ge n_0 \implies |f(n+x)| < \varepsilon, \forall x \in [0,1]$$
Now for any $x \ge n_0$ we have:
$$|f(x)| = \left|f\left(\underbrace{\lfloor x \rfloor}_{\in \mathbb{N} \cap [n_0, +\infty\rangle} + \underbrace{(x - \lfloor x \rfloor)}_{\in [0,1]}\right)\right| < \varepsilon$$
Therefore $\lim_{x\to\infty} f(x) = 0$.
