Proving that a function $q:\mathbb{N}\to\mathbb{Q}$ is surjective

58 Views Asked by At

Proposition. Let $q:\mathbb{N}\to\mathbb{Q}$ be defined by $q(n)=\frac{n-m^3-m^2}{m}$ if $m$ is an integer with $m^3\leq n<(m+1)^3$. Then $q$ is surjective.

Proof attempt. Note that $m$ is uniquely determined by $n$. In fact $m=\left \lfloor{\sqrt[3]{n}}\right \rfloor \in \mathbb{N}$. Clearly $m\to \infty$ as $n \to \infty$. Fix $m \in \mathbb{N}$. As $n$ ranges through $m^3,m^3+1,\dots,(m+1)^3-1$ we have that $q(n)$ ranges through

$$-m,-m+\frac{1}{m},\dots,0,\frac{1}{m},\dots,2m+3$$

In other words $q(n)$ ranges through all rationals between $-m$ and $2m+3$ whose denominator is $m$. Now, given a rational $\frac{s}{t}\in \mathbb{Q}$ we can pick $n$ large enough so that $\frac{s}{t}\in [-m,2m+3]$ and such that $t$ is a factor of $m$, say $m=tk$ for some $k\in\mathbb{N}$. Then $\frac{s}{t}=\frac{ks}{kt}$ will lie in the range of $q(n)$ as $n$ ranges through $m^3,m^3+1,\dots,(m+1)^3-1$. Hence $q$ is surjective.

Is this proof correct?

1

There are 1 best solutions below

0
On BEST ANSWER

This community wiki solution is intended to clear the question from the unanswered queue.

Yes, your proof is correct.