TITLE: If $f$ is continuous at $a$, is it continuous in some open interval around $a$?
QUESTION [21 upvotes]: If $f: \mathbb{R} \to \mathbb{R}$ is continuous at $a$, is it continuous in some open interval around $a$?

REPLY [6 votes]: Fix an enumeration of the rationals, $q_n$ for $n\in\Bbb N$. We define the following function:$$\large f(x)=\sum_{q_n<x}\frac1{2^n}$$
That is, we sum $\frac1{2^n}$ for all the $n$ such that $q_n$ is strictly smaller than $x$. This function is continuous at every irrational number, but discontinuous at every rational number. Therefore it cannot be continuous on any interval.