$\epsilon$-$\delta$ proof that $f$ is continuous for $x\notin\mathbb Q$ but isn't for $x\in\mathbb Q$ I'm trying to give an $\epsilon$-$\delta$ proof that the following function $f$ is continuous for $x\notin\mathbb Q$ but isn't for $x\in\mathbb Q$. 
Let $f:\mathbb{A\subset R\to R}, \mathbb{A=\{x\in R| x>0\}}$ be given by:
$$
  f(x) = \begin{cases}
1/n,&x=m/n\in\mathbb Q
\\
0,&x\notin\mathbb Q
\end{cases}
$$
where $m/n$ is in the lowest terms.
Can anyone help me with this proof (I'd prefer an answer with an $\epsilon$-$\delta$ proof).
Thank you very much!

For $x=\frac mn\in\mathbb Q$ select $\epsilon=\frac1{2n}>0$. Assume there is $\delta>0$ such that $|x-y|<\delta$ implies $|f(y)-f(x)|<\epsilon$. 
Then especially $f(y)>\frac{1}{2n}$ for such $y$, which means that alls such $y$ are rational and have denominator $<2n$. Even without knowing that the irrationals are dense, we can see that $y=\frac ab$ with $b<2n$ and $y\ne x$ implies
$$|y-x|=\frac{|an-bm|}{bn}\ge \frac1{bn}>\frac1{2n^2}$$
because the numerator must be $\ge 1$. But of course there are (rational) numbers $y$ with $|y-x|\le \frac1{2n^2}$ (for example $y=x+\frac1{2n^2+1}$), hence no such $\delta$ exists, $f$ is not continuous.
Let $x\notin\mathbb Q$ and $\epsilon>0$ be given.
We want a $\delta>0$ such that $|y-x|<\delta$ implies $|f(y)-f(x)|<\epsilon$.
Select $n>\frac1\epsilon$. Then we want that $|y-x|<\delta$ implies that $y$ is either irrational or has a denominator $\ge n$.
For each $k< n$, there are only finitely many rationals $\frac mk$ with denominator $k$ and $|\frac mk-x|<1$. Then
$$\delta =\min\left\{\left|\frac mk-x\right|\colon k<n, \left|\frac mk-x\right|<1\right\} $$
will do the trick.
