I have been trying to find a function f: R->R$f : \mathbb R \to \mathbb R$ such that lim x->c f(x)$\lim_{x \to c} f(x)$ exists when c$c$ is irrational and the limit doesn't exist when c$c$ is rational.
I tried variations of the Dirichlet function and Thomae's function, but I couldn't get anywhere. I also tried proving that such a function cannot exist, using the fact that both the rationals and the irrationals are dense in real numbers. But I couldn't get a satisfying proof that way either.