Sequence of function Does the sequence 
$f_n(x)= 1$   if   $ n<x<n+1$  and $0$  if not,
converge or converge uniformly on the real field.
Im tempted to say that it converge to $f(x)=0$ but I dont know how to justify this rigorously.
 A: Set $g_n(x)=f_n(\frac{x}{n})$, then $g_n(x)=1$ if $x\in (1,1+\frac{1}{n})$ and $0$ if not. Indeed 
$$g_n(x)=\begin{cases} 1,&x\in  (1,1+\frac{1}{n}),\\0,&x\notin  (1,1+\frac{1}{n})\end{cases}.$$ Then $g_n$ converges pointwisely to $f(x)=0$ on $\mathbb{R}$, because for any $x\in (1,1+\frac{1}{m})$ there is natural number $N$ for $n\geq N$; $x\notin  (1,1+\frac{1}{n})$.
Now let $x\in \mathbb{R}$, then there is $N\in \mathbb{N}$ such that $n\geq N$; $|\frac{x}{n}|\leq 1$, so for $n\geq N$; $|x|\leq n$ and so  $f_n(x)=0$ or $$f_n(x)=g_n(x).$$ 
Therefore $f_n$ converges pointwisely to $f(x)=0$ on $\mathbb{R}$. Since $$\sup_x |f_n(x)-f(x)|=\sup_x |f_n(x)|=1$$
thus $f_n$ does not converge to $f=0$ uniformly. 
Hint $1$. Consider the sequence  $a_n = \sup_x |f_n(x) - f(x) |$, then  $f_n$  converges to  $f$  uniformly if and only if  $a_n$  tends to $0$.
Hint $2$. Above method is more general for solution of this problem. But we can use it for generalize of such problem as follow:
Fix $x\in \mathbb{R}$, then there is $N\in \mathbb{N}$; for $n>N$, $x\notin (n,n+1)$ and so for $n>N$, $f_n(x)=0$, therefore this show that for any fixed  $x\in \mathbb{R}$, $f_n(x)$ converges to $0$, in other word, $f_n$ converges pointwisely to $f=0$ on $\mathbb{R}$ and Hint $1$ show that $f_n$ does not converge to $f=0$ uniformly.
More. Let $f,g:\mathbb{R}\rightarrow \mathbb{R}$ be functions and
$$f_n(x)=\begin{cases} g(x),&x\in  (n,n+1),\\ f(x),&x\notin  (n,n+1)\end{cases}$$
be a sequence. Then the method is same and $f_n$ converges pointwisely to $f$ on $\mathbb{R}$ and its converge to $f$ uniformly if only if $\sup_x |f_n(x)-f(x)|=\sup_{x\in (n,n+1)} |g(x)-f(x)|$ tends to zero.
