Show that if $f:\mathbb{R}\rightarrow \mathbb{R}$, such that
$f(p-q\sqrt{3})=p-q\sqrt{2},\qquad \forall\; p,q\in \mathbb{N}$,
then $f$ is not continuous on $\mathbb{R}$.
Show that if $f:\mathbb{R}\rightarrow \mathbb{R}$, such that
$f(p-q\sqrt{3})=p-q\sqrt{2},\qquad \forall\; p,q\in \mathbb{N}$,
then $f$ is not continuous on $\mathbb{R}$.
Hint: You can choose $p$ and $q$ such that $p$ is arbitrarily large and $p-\sqrt{3}q$ is less than some $\varepsilon>0$. Since limits commute with continuous functions, what can we say about $f(0)$?
Let $p_n$ be a sequence of natural numbers diverging to infinity which are the integer part of multiples of $\sqrt{3}$. Then for each $n$, there exists some $q_n>\frac{p_n-\frac{1}{n}}{\sqrt{3}}$. We may pick the smallest such $q_n$, so that $p_n-q_n\sqrt{3}>0$, which exists for $p_n$ close to a multiple of $\sqrt{3}$, and hence $\lim p_n - q_n\sqrt{3} =0$.
Now, $q_n < \frac{\frac{1}{n}+p_n}{\sqrt{3}}$, so that $p_n-\sqrt{2}q_n> \left(1-\sqrt{\frac{2}{3}}\right)p_n -\frac{\sqrt{2}}{\sqrt{3}n}$ which clearly diverges.