I was considering the function
$f_n(x)=\frac{1}{n}\lfloor{xn}\rfloor$
this function obviously has rational numbers as output for all $n\in\mathbb{N}$, then I defined $$f(x):=\lim_{n\rightarrow \infty}f_n(x)$$
the graph then looks like $f(x)=x$
Then I proved its continuity
$$\forall\epsilon>0, let\, \delta=\epsilon , such\, that\, |x-c|<\delta$$ We have
Case $1$, $x>c$
$$\Big|\frac{1}{n}\lfloor{xn}\rfloor-\frac{1}{n}\lfloor{cn}\rfloor\Big|=\frac{1}{n}(\lfloor{xn}\rfloor-\lfloor{cn}\rfloor)<\frac{1}{n}(xn-(cn-1))$$
$$=(x-c)+\frac{1}{n}<\delta+\frac{1}{n}=\delta_n\rightarrow \delta$$
Case $2$, $x<c$
$$\Big|\frac{1}{n}\lfloor{xn}\rfloor-\frac{1}{n}\lfloor{cn}\rfloor\Big|=\frac{1}{n}(\lfloor{cn}\rfloor-\lfloor{xn}\rfloor)<\frac{1}{n}(cn-(xn-1))$$
$$(c-x)+\frac{1}{n}<\delta+\frac{1}{n}=\delta_n\rightarrow \delta$$
However, this result violates the Intermediate value theorem. Because there are 'holes' in the irrationals of the range while the domain is connected
So I'm suspecting that there is something wrong with my proof.
Firstly I know it is true that $f_n(x)$ is rational for all $n$, doesn't mean it is rational as $n$ goes to infinity. An easy example for me is $$\sum_{k=0}^{n}\frac{(-1)^k}{2k+1}\longrightarrow \frac{\pi}{4}$$ But I can't make sense of it in this case. I feel like it is because it is function converging instead of value converging so it's more abstract. I would be very grateful if someone can explain this to me
Moreover, is there some ways/ techniques that we can recognize whether a sequence of rational numbers converges to a rational number?
Thank you