I have seen a lot of material on why the set $(0,1)$ is not countable. Especially Cantor's diagonalization argument. Which seems to prove that the set of natural numbers is smaller than the set of real numbers between 0 and 1.
However, I believe that there does exist an invertible function $f: \mathbb{N} \rightarrow (0,1)$. One such function be the following: $$ f(x) = \sum_{n=0}^{L}\frac{g(x,n)}{10^{n-1}} $$ Where $L = \lfloor\log_{10}(x)\rfloor$ and $g(x,n)$ is defined as: $$ g(x,n) =\Big\lfloor\frac{x}{10^n}\Big\rfloor \mod{10} $$ Which essentially just 'mirrors $x\in\mathbb{N}$ in the decimal point'. To see what I mean here are some examples: \begin{align} f(1) = 0.1000...\\ f(2) = 0.2000...\\ f(42) = 0.2400...\\ f(1726) = 0.62710...\\ \end{align} I do not immediately see where there would be 'gap' where we miss real numbers in this interval. Is there something crucial that I am missing?
My background is not in set theory. So I first wanted to check, before I try to prove that this function is invertible.