A function that is continuous at $c \in \mathbb Z$ and discontinuous at $c \in \mathbb R \setminus \mathbb Z$ I'm looking for a function that is continuous on $\mathbb Z$  and discontinuous on $\mathbb R \setminus \mathbb Z$.
I know the function floor of $x$, denoted $\lfloor x \rfloor$, that is continuous at all $c \in \mathbb R \setminus \mathbb Z$ and discontinuous at all $c \in \mathbb Z$.
But I'm looking for the opposite one.
Thank you.

I think the function $f$ such that :

*

*if $x\in \mathbb{R}-\mathbb{Q}, f(x) = 0$

*if $x\in \mathbb{Q}, f(x) = \sin \pi x$
will work.
