But how can we infer the existence of an unbounded continuous on the space knowing only about some sequence of points in this space
By using the sequence to construct an unbounded continuous function.
Since the sequence - call it $(x_n)_{n\in\mathbb{N}}$ - has no convergent subsequence, every point occurs only finitely many times in the sequence. Passing to a subsequence, we may assume all the $x_n$ are distinct.
For every $m\in\mathbb{N}$, the distance of $x_m$ to the rest of the sequence is positive,
$$\delta_m := \inf \left\{ d(x_m,x_k) : k \in \mathbb{N}\setminus \{m\}\right\} > 0,$$
for if $\delta_m = 0$, then $(x_n)$ would have a subsequence converging to $x_m$.
Now consider the functions
$$f_m(x) = \left(1 - \frac{3}{\delta_m}d(x_m,x)\right)^+,$$
where $u^+$ is the positive part of $u$, $u^+ = \max \{u,0\}$. These functions are continuous since the maximum of two continuous functions is continuous. The function
$$f(x) = \sum_{m=0}^\infty m\cdot f_m(x)$$
is, if well-defined, unbounded, since $f(x_m) \geqslant m$.
It remains to see that $f$ is well-defined and continuous. That follows if we can show that every point $x\in X$ has a neighbourhood on which at most one of the $f_m$ attains values $\neq 0$.
If $x = x_m$ for some $m\in\mathbb{N}$, then $f_k\lvert B_{\delta_m/3}(x_m) \equiv 0$ for all $k\neq m$: Suppose we had $f_k(y)\neq 0$ for some $y\in B_{\delta_m/3}(x_m)$ and some $k\neq m$. Then
$$\max \{\delta_k,\delta_m\} \leqslant d(x_m,x_k) \leqslant d(x_m,y) + d(y,x_k) \leqslant \frac{\delta_m}{3} + \frac{\delta_k}{3} \leqslant 2\frac{\max \{\delta_m,\delta_k\}}{3} < \max \{\delta_k,\delta_m\},$$
so that is impossible.
If $x \neq x_m$ for all $m$, the argument is similar. Let $\delta = \inf \{ d(x,x_n) : n\in\mathbb{N}\}$. Then $\delta > 0$ for otherwise the sequence would have a subsequence converging to $x$. Then on $B_{\delta/4}(x)$ at most one $f_m$ can attain a nonzero value. Suppose again it weren't so, and also $f_k$ attained a nonzero value there. Then we have $y,z \in B_{\delta/4}(x)$ with $f_m(y) \neq 0$ and $f_k(z) \neq 0$. That implies $\frac{3}{4}\delta < \frac{1}{3}\min \{ \delta_m,\delta_k\}$ since $d(y,x_m) \geqslant d(x,x_m) - d(x,y) \geqslant \frac{3}{4}\delta$ and similarly for $x_k$. But then we would have
$$0 < \max \{ \delta_m,\delta_k\} \leqslant d(x_m,x_k) \leqslant d(x_m,y) + d(y,z) + d(z,x_k) \leqslant \frac{\delta_m}{3} + \frac{1}{2}\delta + \frac{\delta_k}{3} < \max \{\delta_m,\delta_k\}.$$
Since every point has a neighbourhood on which at most one $f_k$ does not identically vanish, $f$ is well-defined and continuous.
Lemma: Let $(X,d)$ be a metric space. For each $n \in \{1,2,3,\ldots\}$ there is (by Zorn's lemma) a maximal (by inclusion) set $D_n$ such that for all $x,y \in D_n$ with $x \neq y$, we have $d(x,y) \ge \frac{1}{n}$. If all $D_n$ are at most countable, then $X$ is separable.
Proof: We'll show that $D = \cup_n D_n$ is dense (and is countable when all $D_n$ are), and so pick any $x \in X$ and any $r>0$ and we'll show that $B(x,r) \cap D \neq \emptyset$. Suppose not, then find $m$ with $\frac{1}{m} < r$. Then from $B(x,r) \cap D = \emptyset$ we know that
$d(x, y) \ge \frac{1}{m}$ for all $y \in D_m$ (or else $y \in D \cap B(x,r)$), and then $D_m \cup \{x\}$ would contradict the maximality of $D_m$. So the intersection with $D_m$ and hence $D$ is non-empty, and so $D$ is dense.
(The above is the heart of the proof that a ccc metric space is separable, as $X$ ccc implies that all $D_m$ are countable, as the $B(x,\frac{1}{m})$, $x \in D_m$ are a pairwise disjoint open family of non-empty sets.)
Now suppose that $(X,d)$ is countably compact. Suppose for a contradiction that $X$ is not separable. Then for some $m \ge 1$ we have that $D_m$ (as in the lemma) is uncountable.
Fix such an $m$.
Now $D_m$ is discrete (clear as $B(x,\frac{1}{m}) \cap D_m = \{x\}$ for each $x \in D_m$) and closed: suppose that $y \in X\setminus D_m$ is in $\overline{D_m}$, then $B(y, \frac{1}{2m})$ contains infinitely many points of $D_m$ and for any $2$ of them, say $x_1, x_2 \in D_m$, we'd have $d(x_1, x_2) \le d(x_1, y) + d(y,x_2) < \frac{1}{m}$ contradiction (as points in $D_m$ are at least $\frac{1}{m}$ apart). So $D_m$ is closed and discrete (as an aside: being uncountable this would already contradict Lindelöfness of $X$; this shows that a Lindelöf metric space is separable, e.g.), but we want to contradict countable compactness, which is easy too:
Choose $A \subseteq D_m$ countably infinite (so that $A$ is closed in $X$, as all subsets of $D_m$ are), and define a countable open cover $\mathcal{U} = \{B(p, \frac{1}{m}): p \in A\} \cup \{X\setminus A\}$ of $X$ that has no finite subcover: we need every $B(p,\frac{1}{m})$ to cover $p$ for all $p \in A$.
This contradiction then shows $X$ is separable (and thus has a countable base ,is Lindelöf etc. finishing the compactness).
The crucial fact is that all of the following are equivalent for a metric space:
- $X$ has a countable base.
- $X$ is separable.
- All discrete subspaces of $X$ are at most countable.
- All closed and discrete subspaces of $X$ are at most countable.
- $X$ is ccc.
- $X$ is Lindelöf.
In the above I essentially did "not (2) implies not (4)" implicitly. The fun is that countable compactness implies (4) easily (such closed discrete subspaces are even finite) and thus we get Lindelöfness "for free". Also implicit in the above proof is that every countably compact space is limit point compact.
Best Answer
There exists a bijection $f: \mathbb R \to [0,1]$. Define $d(x,y)=|f(x)-f(y)|$. This makes $\mathbb R$ compact.