I've seen examples of functions that are continuous only at the irrationals, and discontinuous at the rationals, and I wanted to go a bit further, but I couldn't come up with a function like the one in the title.
Does anyone know such an $f$?
I've seen examples of functions that are continuous only at the irrationals, and discontinuous at the rationals, and I wanted to go a bit further, but I couldn't come up with a function like the one in the title.
Does anyone know such an $f$?
Let $\{a_n\}$ be the set of algebraic real numbers. Define $$ f(x)=\left\{ \begin{array}{lll} \frac{1}{n} & \text{if} & x=a_n,\\ 0 & \text{if} & \text{$x$ is transcendental} \end{array} \right. $$ Check that $f$ is continuous at $x$ iff $x$ is transcendental.