To let $ mathbb {Q} $ Let the set of rational numbers and let $ mathbb {Q} ^ + $ Be the set of positive ($ x> 0 $) rationals.

I'm looking for a simple construction of a homeomorphism $ phi: mathbb {Q} rightarrow mathbb {Q} ^ 2 $ (without using an abstract result). In an early post, it was suggested to use continued fractions, but this has problems with negative numbers. My idea is that we can make a homeomorphism first $ f: mathbb {Q} ^ + rightarrow mathbb {Q} $ about $ f (x) = (x-1) ^ 3 / x $ and then we can only worry $ mathbb {Q} ^ + $,

Then the homeomorphism

$ phi: Q ^ + rightarrow (Q ^ +) ^ 2 $ just would go like that

$ (a_0, a_1, …, a_n) rightarrow ((a_0, a_2, …), (a_1, a_3, …)) $

this obviously seems to be bijective, and I believe it is bicontinuous, based only on the idea that two continued fractions are close to each other if and only if enough of their original concepts match (which sounds plausible).

Does it make sense? Or do I miss something? Thanks for your help.