Is there a rational surjection $\Bbb N\to\Bbb Q$? The question is in the title. Is there a one-dimensional rational function $f\in\Bbb R(X)$ which restricts to $\Bbb N\to\Bbb Q$, which is a surjection onto $\Bbb Q$? My guess is no.
Expanding the scope a little (at the expense of precision), are there any "nice" functions that enumerate $\Bbb Q$? Here "nice" is meant to exclude the floor function or absolute value function and related trickery. At first I thought it might work to use analytic functions here, but there is an analytic function taking any chosen values on $\Bbb N$ subject to a mild growth hypothesis (I think $f(n)\in o(n)$), by defining $f(z)=\sum_{n\in\Bbb N}a_n{\rm sinc}(\frac{z-n}\pi)$, where ${\rm sinc}(z)=\frac{\sin(z)}z$ continuously extended over zero. I will let answerers supply their own definitions of "nice" if they want to tackle the broader question.

This is an alternative argument based on Arnaud's suggestion. Without loss of generality, you can assume the rational function $f$ is $\frac{p}{q}$ where $n = \deg(p) \ge \deg(q) = m$ (otherwise trade $f$ in for $\frac{1}{f}$). But then (using $(\frac{p}{q})' = \frac{p'q - pq'}{q^2}$) you have:
$$
f'(x) = \frac{(n-m)p_nx^{m+n-1} + \mbox{terms of lower degree}}{x^{2m} +  \mbox{terms of lower degree}}
$$
where, without loss of generality, I have assumed $q$ is monic and where $p_n \neq 0$ and $n > 0$ (if $n = 0$, $f$ is constant).
So as $x$ tends to $\pm\infty$, $f'(x)$ tends to $\pm\infty$, if $n > m+ 1$, and to $p_n \neq 0$ if $n = m + 1$. So $f(x)$ is monotonic whenever $|x|$ is sufficiently large if $n > m$. If $m = n$, then as $x$ tends to $\pm\infty$, $f(x)$ tends to $\pm p_n$, so $f(x)$ is bounded. But if $f(x)$ is either monotonic for large enough $|x|$ or bounded, then $f$ cannot map $\Bbb{N}$ onto $\Bbb{Q}$.
