Points of continuity of the function $f(t)=\frac{p+\sqrt{2}}{q+\sqrt{2}}- \frac{p}{q}$. Let $f$ be the function $f(t)=\frac{p+\sqrt{2}}{q+\sqrt{2}}- \frac{p}{q}$ if $t \in \mathbb{Q}$ and $t=\frac{p}{q}$ with $p,q$ relatively prime. $f(t)=0$ if $t \not\in \mathbb{Q}$.
At which points is this funtion continuous?
So clearly $f$ is discontinuous at all rational points because for $t \in \mathbb{Q}$, $f(t)\neq 0$ but there are sequences of irrationals converging to every rational and the value of the function on these points is 0. 
Suppose that $f$ is continuous at some $\xi \in \mathbb{Q}^c$. So let $\{\frac{a_n}{b_n}\}$ be a sequence converging to $\xi$ then it must hold that  $\frac{a_n+\sqrt{2}}{b_n+\sqrt{2}} - \frac{a_n}{b_n}\rightarrow 0$. How to I proceed from here?
 A: $f(t)$ is continuous for all irrational $t$ and for $t=1$ and dicontinuous otherwise. The idea behing the proof is basically the same as that of the Thomae's function: we show that if we consider a tiny interval around an irrational number $t$ then the only rational numbers $\frac{p}{q}$ in this interval has huge denominators $q$. Since $f(p/q) \propto \frac{1}{q}$ this implies that $\lim_{n\to\infty}|f(t_n) - f(t)| = 0$ for any sequence $t_n$ converging to $t$. On the other hand if $t$ is rational then any interval around $t$ will contain irrational numbers for which $f(t_n) = 0$ which means that $f(t_n) - f(t)$ cannot converge to $0$ if the sequence $t_n$ has infinitely many irrational numbers in it.

$f(t)$ is continuous for irrational $t$
Let $t$ be irrational. Consider all fractions $\frac{p}{q} \in [t-1,t+1]$ with $\gcd(p,q)=1$ and $q\leq k$ and define $\delta = \max\left|\frac{p}{q}-t\right|$. Since $t$ is irrational and the set of fractions $\frac{p}{q}$ we consider is finite we must have $\delta > 0$. By construction the interval $(t-\delta,t+\delta)$ does not contain any fractions $\frac{p}{q}$ with $q\leq k$.
Now let $t_n = \frac{p_n}{q_n}$ be a sequence of rationals converging to an irrational $t$. We then have
$$\left|f(t_n) - f(t)\right| = \left|\frac{\sqrt{2}(1-t_n)}{\sqrt{2}+q_n}\right|$$
First of all since $t_n\to t$ there exist a $N$ such that if $n\geq N$ then $|1-t_n| < 2+t$. Next fix $M\in\mathbb{N}$ then by the first result above there exist a $\delta_M$ such that $q_n\geq M$ if $|t_n-t|<\delta_M$. Again since $t_n\to t$ there exist a $L$ such that $|t_n-t|<\delta_M$ if $n\geq L$. If $n\geq \max(N,M,L)$ we therefore have
$$\left|f(t_n) - f(t)\right| < \left|\frac{\sqrt{2}(2+t)}{\sqrt{2}+M}\right|$$
and since $M$ was arbitrary we get $\lim_{n\to\infty} |f(t_n) - f(t)| = 0$. This last step can be done with an $\epsilon$ as follows: first fix $\epsilon > 0$ and then take $M > \frac{\sqrt{2}(2+t)}{\epsilon}$ to get $n\geq \max(N,M,L) \implies |f(t_n) - f(t)| < \epsilon$.
The last thing to note is that if we have a general sequence $t_n$ consisting of both rationals and irrationals then since $f(t_n) = 0 \implies f(t_n)-f(t) = 0$ when $t_n$ is irrational it follows that $\lim_{n\to\infty}f(t_n) = \lim_{n\to\infty,~t_n\in\mathbb{Q}}f(t_n) = 0$ by the argument above so $f(t)$ is continuous for all irrational $t$.

$f(t)$ is discontinuous for rational $t\not= 1$
If $t=1$ then $f(t) = 0$ and it follows that if $t_n\to t$ then
$$\lim_{n\to\infty}\left|f(t_n) - f(t)\right| < \lim_{n\to\infty}\left|\sqrt{2}(1-t_n)\right| = 0$$
so $f$ is continuous at $t=1$. If $t = \frac{p}{q} \in \mathbb{Q}$ and $t\not =1$ then
$$\left|f(t_n) - f(t)\right| = \left|f(t_n) - \frac{\sqrt{q}(1-t)}{\sqrt{2}+q}\right|$$
Now consider a sequence of irrational numbers $t_n\to t$ (for example $t_n = t - \frac{\sqrt{2}}{n}$), then $\left|f(t_n) - f(t)\right| = \left|\frac{\sqrt{q}(1-t)}{\sqrt{2}+q}\right|$ which does not converge to zero so $f$ is dicontinuous for rational $t\not= 1$.
A: Let t be the irrational number and $\frac{p}{q} \to t$. In particular ${1/q} \to 0$.
Calling the the root of 2 by $s$ 
we have 
$$\frac{p+s}{q+s}-\frac{p}{q}=\frac{(p+s)q-p(q+s))}{q(q+s)}=\frac{(p-q)s}{q(q+s)}$$
then $\frac{(p-q)s}{q}\to(t-1)s$ and as $\frac{1}{q+s} \to 0$ we have $f(p/q)\to 0$ 
