Let $\langle r_n\rangle$ be an enumeration of the set $\mathbb Q$ of rational numbers such that $r_n \neq r_m\,$ if $\,n\neq m.$ $$\text{Define}\; f: \mathbb R \to \mathbb R\;\text{by}\;\displaystyle f(x) = \sum_{r_n \leq x} 1/n^{2},\;x\in \mathbb R.$$ Prove that $f$ is continuous at each point of $\mathbb Q^c$ and discontinuous at each point of $\mathbb Q$.
I find it difficult to prove especially the continuity on irrationals, I proved the discontinuity on a rational number in the following way is it correct?
Let $ c \in \Bbb Q $ then $ c=r_n $ for some $n \in \Bbb N $ and
Let $ \epsilon_0 = 1/n^{2} $
Let $\delta > 0 $ be arbitrary and let $ x \in (c-\delta. c+\delta)$ such that $x<c $
Then $|f(x)-f(c)|>1/n^{2}=\epsilon_0 $
How do prove that it is continuous on irrationals?