I'm trying to prove the bijectivity of the function $\nu(r,m)$ and already have the injective proof down, but am having trouble with the surjectivity. I have to prove the following function is surjective to the positive odd integers. I have a proof written below, but what to double-check it.
For some function $\nu(r,m) = 2^{r+1}m + \frac{2^{r}(3-2(-1)^{r})-1}{3}$, $r \in \mathbb{Z^{+}}$ and $m \in \mathbb{N}$
Prove $\nu(r,m): \mathbb{Z^{+}} \times \mathbb{N} \rightarrow 2\mathbb{N}+1$
First, define the set $V_{r} = 2^{r+1}\mathbb{N} + \frac{2^{r}(3-2(-1)^{r})-1}{3}$, $r \in \mathbb{Z^{+}}$
Note that:
$V_{1} = 2^{2}\mathbb{N}+3$
$V_{2} = 2^{3}\mathbb{N}+1$
$V_{2n+1} = 2^{2n+2}\mathbb{N} + \frac{2^{2n+1}(5)-1}{3}$
$V_{2n} = 2^{2n+1}\mathbb{N} + \frac{2^{2n}-1}{3}$
The surjectivity proof is the same as showing that $\bigcup\limits_{r=1}^{\infty} V_{r} = 2\mathbb{N}+1$.
$\\$
First we need Lemma 1: $2^{a}\mathbb{Z} + b = (2^{a+1}\mathbb{Z} + b)\cup(2^{a+1}\mathbb{Z}+ 2^{a} + b)$, for $a,b \in \mathbb{Z}$
$\\$
Theorem 1: Prove by induction that $2^{(2n+1)}\mathbb{N} + \frac{2^{(2n+2)}-1}{3}=V_{2n+2} \cup \left( 2^{(2n+3)}\mathbb{N} + \frac{2^{(2n+4)}-1}{3} \right) \cup V_{2n+1}$
$\\$
$\underline{Step-1}$: For $n=0$ and using Lemma 1
$2^{1}\mathbb{N} + \frac{2^{2}-1}{3}=2^{1}\mathbb{N}+1=(2^{2}\mathbb{N}+1)\cup(2^{2}\mathbb{N}+3)$
$=(2^{2}\mathbb{N}+1)\cup V_{1}$
$=((2^{3}\mathbb{N}+1)\cup (2^{3}\mathbb{N}+5))\cup V_{1}$
$=V_{2}\cup (2^{3}\mathbb{N}+5) \cup V_{1}$
$=V_{2(0)+2} \cup \left( 2^{(2(0)+3)}\mathbb{N} + \frac{2^{(2(0)+4)}-1}{3} \right) \cup V_{2(0)+1}$
Therefore, it holds true for $n=0$
$\\$
$\underline{Step-2}$: Assume it holds true for $n=k$
$2^{(2k+1)}\mathbb{N} + \frac{2^{(2k+2)}-1}{3}=V_{2k+2} \cup \left( 2^{(2k+3)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} \right) \cup V_{2k+1}$
$\\$
$\underline{Step-3}$: For $n=k+1$, using Lemma 1, and noting that the following set is the same set as the middle set on the RHS from $n=k$
$2^{(2k+3)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} = \left( 2^{(2k+4)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} \right) \cup \left( 2^{(2k+4)}\mathbb{N} + 2^{(2k+3)} + \frac{2^{(2k+4)}-1}{3} \right)$
$= \left( 2^{(2k+4)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} \right) \cup \left( 2^{(2k+4)}\mathbb{N} + \frac{2^{(2k+3)}(5)-1}{3} \right)$
$= \left( 2^{(2k+4)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} \right) \cup V_{2k+3}$
$= \left( 2^{(2k+5)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} \right) \cup \left( 2^{(2k+5)}\mathbb{N} + 2^{(2k+4)} + \frac{2^{(2k+4)}-1}{3} \right) \cup V_{2k+3}$
$= \left( 2^{(2k+5)}\mathbb{N} + \frac{2^{(2k+4)}-1}{3} \right) \cup \left( 2^{(2k+5)}\mathbb{N} + \frac{2^{(2k+4)}(4)-1}{3} \right) \cup V_{2k+3}$
$= V_{2k+4} \cup \left( 2^{(2k+5)}\mathbb{N} + \frac{2^{(2k+6)}-1}{3} \right) \cup V_{2k+3}$
$= V_{2(k+1)+2} \cup \left( 2^{(2(k+1)+3)}\mathbb{N} + \frac{2^{(2(k+1)+4)}-1}{3} \right) \cup V_{2(k+1)+1}$
Therefore it's true for $n=k+1$
$\\$
$\\$
Using Theorem 1 we can start with $n=0$ and continue:
$2^{1}\mathbb{N}+1 = V_{2}\cup \left( 2^{3}\mathbb{N} + \frac{2^{4}-1}{3} \right) \cup V_{1}$
$2\mathbb{N}+1 = V_{2}\cup V_{4}\cup \left( 2^{5}\mathbb{N} + \frac{2^{6}-1}{3} \right) \cup V_{3} \cup V_{1}$
$2\mathbb{N}+1 = V_{2}\cup V_{4}\cup V_{6}\cup \left( 2^{7}\mathbb{N} + \frac{2^{8}-1}{3} \right) \cup V_{5} \cup V_{3} \cup V_{1}$
...
$2\mathbb{N}+1 = V_{2}\cup V_{4}\cup V_{6}\cup ... \cup V_{5} \cup V_{3} \cup V_{1}$
$2\mathbb{N}+1 = \bigcup\limits_{r=1}^{\infty} V_{r}$
$\\$
Therefore, $\nu(r,m): \mathbb{Z^{+}} \times \mathbb{N} \rightarrow 2\mathbb{N}+1$
I suggest you the following alternative proof. Write the function $\nu$ as follows: \begin{align} &\nu(r,m)=2^{r+1}m+\frac{2^rg(r)-1}3& g(r)=3-2(-1)^r \end{align} Then for every $r$ we have:
Let $n$ be a positive odd integer. There exists, and are uniquely determined, $r>0$ and $q$ odd such that $$3n+1=2^rq\tag 1$$ Then we have $2^rq\equiv 1\pmod 3$ and $q\equiv 1\pmod 2$, hence $q\equiv 2^{-r}\equiv g(r)\pmod 3$ and $q\equiv 1\equiv g(r)\pmod 2$, from which follows $q\equiv g(r)\pmod 6$. Since $1\leq g(r)\leq 5$, this implies $g(r)=q\bmod 6\leq q$.
On the other hand $3n+1\equiv 2^rg(r)\pmod{2^{r+1}}$ gives $n\equiv\nu(r,0)\pmod{2^{r+1}}$. Thus $$m=\frac{n-\nu(r,0)}{2^{r+1}}=\frac{2^r(q-g(r))}3$$ is a non-negative integer and we have $n=\nu(r,m)$, thus proving $\nu$ to be surjective.