# Possible to have a continuous sequence?

I'm wondering if it's possible to have a continuous sequence $f: \mathbb{N} \to \mathbb{R}$? My intuition is telling me no because logically it would be impossible to map the natural numbers onto the real numbers but I'm not sure how to formalize it. What do you think? How would you prove that no function over the natural numbers (no sequence) is continuous?

For example, how would you prove that $f: \mathbb{N} \to \mathbb{R}$ such that $f(n) = n^{2}$ is not continuous over the natural numbers?

• What is your topology on the natural numbers?
– A.S
Mar 10, 2013 at 18:59
• Just the real numbers
– user39898
Mar 10, 2013 at 19:00
• If $\mathbb{N}$ is equipped with the topology induced by the usual metric of $\mathbb{R}$, then any function $f:\mathbb{N}\longrightarrow X$ is continuous, whatever topological space $X$ you consider. Indeed, $|n-n_0|<1/2$ implies $n=n_0$, so $f(n)=f(n_0)$ falls in any neighborhood of $f(n_0)$. Mar 10, 2013 at 19:02
• @Decave What exactly do you mean for a function $f : \mathbb N \to \mathbb R$ to be continuous? Do you have a particular topology on $\mathbb N$ in mind?
– A.S
Mar 10, 2013 at 19:04
• @AndrewSalmon I'm in an introductory Analysis class so I was referring to (naively, I guess) functions over the real numbers. How would I state that more formally?
– user39898
Mar 10, 2013 at 19:06

## 3 Answers

As you may have gathered from the comments to your question: It is interesting to ask whether a function (say, $$\Bbb{R} \to \Bbb{R}$$) is continuous, but (at least in the "default settings", i.e. probably anything you encounter in introductory analysis) it isn't interesting to ask whether a sequence is continuous.

You conjectured that this isn't interesting because it's never continuous... But in fact it's uninteresting because it's always continuous!

To understand why this is, we need to generalize the notion of continuity. I'll start with something you may have heard in your analysis class, which is continuity of real functions:

Definition 1 (continuity in introductory analysis). A function $$f : \Bbb{R} \to \Bbb{R}$$ is continuous if for every $$x_0 \in \Bbb{R}$$ and $$\epsilon > 0$$ there exists $$\delta > 0$$ so that whenever $$x \in (x_0 - \delta, x_0 + \delta)$$, we have $$f(x) \in (f(x_0) - \epsilon, f(x_0) + \epsilon)$$.

Good. Okay, now let's try to explore some properties of continuous functions and hopefully we can get something we can formulate in a more general setting.

Take a continuous function $$f$$ and some open interval $$(a,b)$$ (let's say $$a are real numbers). What can be said about the inverse image $$f^{-1}\left((a,b)\right)$$? First, let's recall what this means:

$$f^{-1}((a,b)) = \{ x \in \Bbb{R} : f(x) \in (a,b) \}$$

That is, it's the set of $$x$$ values which, after applying $$f$$, fall into our interval $$(a,b)$$. (Note that $$f$$ does not have to be invertible for this to make sense.)

Now, take some $$y_0 \in (a,b)$$. This point is inside an open interval, so it can't be at the edge - it must be bigger than $$a$$ and smaller than $$b$$. In particular, there is some $$\epsilon >0$$ such that the entire interval $$(y_0 - \epsilon, y_0 + \epsilon)$$ is contained in $$(a,b)$$.

Let's say $$x_0$$ is some point that satisfies $$f(x_0) = y_0$$ (there could be none, there could be one, or there could be many of those...) In any case, since $$f$$ is continuous, we have (from definition 1 above) that there exists $$\delta>0$$ so that the entire $$\delta$$-neighborhood of $$x_0$$ goes into the $$\epsilon$$-neighborhood of $$y_0$$, which is contained in $$(a,b)$$.

This means that whenever $$f$$ sends $$x$$ somewhere inside the interval $$(a,b)$$, it sends an entire open interval (maybe a very small one) around $$x$$ still inside the interval $$(a,b)$$. In other words, the inverse image $$f^{-1}\left((a,b)\right)$$ contains an interval around every point inside it.

We can formulate our findings as a theorem:

Theorem 2. If a function $$f : \Bbb{R} \to \Bbb{R}$$ is continuous, then for any interval $$(a,b)$$, the inverse image $$f^{-1}((a,b))$$ is a union of intervals.

In fact, the reverse direction is also true. I'll leave it for you as an exercise (you don't have to do the exercise right now - you'll receive it again in topology class someday):

Exercise 3. If a function $$f : \Bbb{R} \to \Bbb{R}$$ has for any interval $$(a,b)$$ that the inverse image $$f^{-1}((a,b))$$ is a union of intervals, then $$f$$ is continuous.

The theorem and the exercise together form a necessary and sufficient criterion for the continuity of a real function. This means it can be regarded as an alternative definition of continuity. However, we want to generalize beyond $$\Bbb{R}$$, since we want to understand what a continuous sequence is (whose domain is $$\Bbb{N}$$).

What structure that's specific to $$\Bbb{R}$$ have we used? Intervals. Other spaces, say $$\Bbb{N}$$, may have nothing you would naturally call an interval. Therefore, let's extract the intervals out of the definition:

Definition 4. An open set in $$\Bbb{R}$$ is a subset of $$\Bbb{R}$$ that's either empty or may be represented as union of intervals.

Definition 5 (continuity in topology). A function $$f$$ is continuous if for any open set $$U$$, the inverse image $$f^{-1}(U)$$ is also open.

From Theorem 2 and Exercise 3 you can see that the two definitions of continuity coincide: A real function is continuous in the sense of analysis if and only if it's continuous in the sense of topology.

However, the last definition is much easier to generalize: Let's say you're given a function $$f : X \to Y$$ where $$X$$ and $$Y$$ are some sets, and you need to find out whether the function is continuous. The question you should ask is then: What are the topologies? That is, which sets in the spaces $$X$$ and $$Y$$ are considered "open"? If one of them is $$\Bbb{R}$$ then usually Definition 4 (or an equivalent definition) is used.

However, if you want to know whether a sequence $$f : \Bbb{N} \to \Bbb{R}$$ is continuous, then you also need to know the topology (that is, which sets are open) in $$\Bbb{N}$$, where there are no intervals. In fact, $$\Bbb{N}$$ has quite a boring (default) topology:

Definition 6. An open set in $$\Bbb{N}$$ is just any set.

One way to understand this definition: We want to view $$\Bbb{N}$$ as a subspace of $$\Bbb{R}$$. So to get an open set in $$\Bbb{N}$$, we take an open set in $$\Bbb{R}$$ and remove any non-natural numbers. If you think about it - any set of natural numbers may be generated this way! (Take a small interval around any natural number you want in your open set, and union all the intervals you took.)

From this we finally get the easy

Corollary 7. Any sequence $$f : \Bbb{N} \to \Bbb{R}$$ is continuous.

Proof. Let $$U$$ be an open set in $$\Bbb{R}$$. Its inverse $$f^{-1}(U)$$ is some set of natural numbers we know nothing about. But no matter - it's open by Definition 6. So $$f$$ is continuous by Definition 5. QED.

• Phenomenally awesome answer and explanation. Thank you very much, sir.
– user39898
Mar 10, 2013 at 22:20
• Sure thing :) I practice explaining these kinds of things since I'm hopefully teaching them (TAing) next year. Good luck on your class! Mar 10, 2013 at 22:29
• Corollary 7 is true even if the range of the sequence is any topological space. Am I right ? Nov 16, 2018 at 5:23
• Yes Neil, as long as we equip $\mathbb{N}$ with the "default" (discrete) topology in which any set is open, any function from this space to any topological space is continuous, because the inverse image of any open set in the range, whatever it is, must be open. Nov 16, 2018 at 9:15

I'll just take up one part of the question, where OP writes, "logically it would be impossible to map the natural numbers onto the real numbers but I'm not sure how to formalize it." The way to formalize the impossibility of mapping the natural numbers onto the real numbers (and here I am using the word onto in its precise, mathematical sense; $f:A\to B$ is onto if for every $b$ in $B$ there is an $a$ in $A$ such that $f(a)=b$) is to apply Cantor's theory of the cardinality ("size") of infinite sets. Cantor proved that there is no map from the naturals to the reals by what is called "a diagonal argument", by which he constructed, for any map $f:{\bf N}\to{\bf R}$, an element $b$ in $\bf R$ for which there is no $a$ in $\bf N$ with $f(a)=b$.

If you want to know more about Cantor, cardinality, diagonal arguments, and suchlike, there have been numerous discussions of these topics on this website and elsewhere on the web, and I have given you some keywords to search.

If you extend the domain of the sequence to include the first limit ordinal $\omega$, youll get a more interesting result.