# On pointwise convergence of sequences of real continuous functions

Is there a sequence of continuous functions $\{f_k\}_{k \in \mathbb{N}},f_k : \mathbb{R} \rightarrow \mathbb{R},$ that converges pointwise to some $f:\mathbb{R} \rightarrow \mathbb{R}$ such that $\{x \in \mathbb{R} : |f(x) - f_k(x)| \leq 1,\forall k \in \mathbb{N}\}$ is not a closed set?

If $f$ is continuous, this clearly cannot happen, because such set would be an intersection of closed sets, hence closed. However, I could not find an example of sequence satisfying the property.

-
 Sorry, wrote the wrong inequality sign. I fixed it now. – Daniel Jul 2 '11 at 0:30

This is the wrong question to ask. A limit only care about the eventual information of a sequence, but your condition cares about $f_k$ for all $k.$ This makes examples very easy to come up with.
Choose any sequence of continuous functions $\langle g_n \rangle$ which converge to the function $f:\mathbb{R} \rightarrow \mathbb{R}$ defined by $f(x) = 0$ if $x$ is negative and $f(x) = 1$ if $x$ is positive which satisfy $|g_n(x) - f(x)| \leq 1$ for all $x.$ Set $f_k = g_{k+1}$ and $f_1(x) = -\frac{1}{2}.$ Then the set $\{ x\in \mathbb{R}: |f(x) - f_k(x)| \leq 1,\forall k\in\mathbb{Z}_+\}$ is the negative reals and hence open.
A more interesting question would be if one can choose a sequence $\langle f_k \rangle$ composed of continuous functions such that the pointwise limit $f$ exists and satisfies the condition that the set $\{ x\in \mathbb{R}: |f(x) - f_k(x)| \leq 1,\forall k>N\}$ is not closed for any $N\in\mathbb{N}.$ The answer is yes. Hint: take $f$ to be the floor function and work backwards.