Is it true that "$\lim_{n \rightarrow \infty} f(\frac{a}{n}) = 0 $ implies $f(x)$ has a limit in $0$? Is the following statement true?
Let, $f:\mathbb{R} \rightarrow \mathbb{R}$ a function that satisfies that, for evety $a \in \mathbb{R}$, the sequence $\{ f(\frac{a}{n}) \}$ converges to $0$. Then $f$, has a limit in $0$.
I think this is true, but not sure how to prove it.
Thank you!
 A: Hint Consider the function $f$ defined by
$$
f(x)=\left\lbrace
\begin{array}{ll}
x\sqrt{p}, & \text{if } x \text{ is a rational multiple of } \frac{1}{\sqrt{p}} \text{ for some prime} p \\
0, & \text{otherwise}
\end{array}\right.
$$
A: Suppose that $f\left(\dfrac{1}{e^n}\right)=1$ for all $n\in \mathbb N$, and $f(x)=0$ if $x$ does not have the form $\dfrac{1}{e^n}$.
A: For any non-zero real number $a$, define $[a]$ to be the set of all numbers $a\frac{n}{m}$, where $n$ and $m$ are non-zero integers. Either $[a]=[b]$ or $[a]\cap[b]=\emptyset$; indeed, if $[a]$ and $[b]$ share a common element, then $a\frac{m}{n}=b\frac{p}{q}$ for non-zero integers $m,n,p,q$, which gives $a=b\frac{pn}{qm}$ and $b=a\frac{mq}{np}$.
Choose any irrational number $a_{1}\in(\frac{1}{2},1]$. Then choose an irrational number $a_{2}\in (\frac{1}{3},\frac{1}{2}]$ which is not in $[a_{1}]$. Next choose an irrational number $a_{3} \in (\frac{1}{4},\frac{1}{3}]$ which is not in $[a_{1}]\cup[a_{2}]$. Continue by induction to find a sequence of rational numbers $\{ a_{n}\}_{n=1}^{\infty}$ such that $a_{n} \in (\frac{1}{n+1},\frac{1}{n}]$ and so that none of the sets $[a_{n}]$ share a common element. Define a function $f$ so that $f(a_{n})=1$ and $f(x)=0$ otherwise. Then
$\lim_{n}f(a_{n})\ne 0$, even though $\lim_{n}a_{n}=0$. So $\lim_{x\rightarrow 0}f(x)\ne 0$. If $b$ is an irrational number, then $\{ b,\frac{b}{2},\frac{b}{3},\ldots\}$ contains at most one $a_{n}$ and, hence, $\lim_{n\rightarrow\infty}f(\frac{b}{n})=0$. If $b$ is rational then $f(b)=0$ and, hence, $\lim_{n\rightarrow\infty}f(\frac{b}{n})=0$ because $b/n$ is also rational.
