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.

If nice is taken to mean analytic function there sure is. There exists a result from complex analysis that states that if $\lim_{n\to\infty} c_n=\infty$ and $a_n$ is a sequence of complex number then there's an analytic functionn $f$ such than $f(c_n) = a_n$. Now let $c_n = n$ and $a_n$ be an enumeration of $\mathbb Q$ then this result guarantees the existence of such a function.
