Explicit bijection between $\mathbb{N}$ and a dense subset of some interval in $\mathbb{R}$

I am working on a way of expressing some kinds of countably infinite sums in terms of easier to evaluate integrals. Many kinds of double summations are handled quite easily, however I am finding it more difficult to express using the same techniques any "single summation," such as the standard sum $\sum_{n=0}^\infty$.

It would suffice to find any kind of "nice" bijection between the naturals and some dense subset of any interval in $\mathbb{R}$. As this number will be a portion of a term in an infinite series, the "nicer" the bijection the better.

For example, Thomas Andrews (Produce an explicit bijection between rationals and naturals?) illustrated a relatively simple-to-write bijection, but it is not simplifiable in any significant way; any term in my series based on that function would of near necessity be described in terms of the prime factorization of the input, which relates to so few infinite sums as to be virtually worthless in this case. Similarly, there are many recursive results scattered throughout math.stackexchange which do not suffice.

Without the constraint that the dense subset be $\mathbb{Q}$, my hope is that this problem is tractable, and any insights against or in favor of its tractability would be appreciated.

• @AlexWertheim They want to find a bijection between $\mathbb N$ and some dense subset of an interval. Of course, you can't find a bijection between $\mathbb N$ and an uncountable dense set, so whatever the set will turn out to be it will be countable. – Wojowu Dec 18 '16 at 10:13
• @AlexWertheim I feel like a better change would be to replace "any" with "some", because this is what OP seems to ask about. – Wojowu Dec 18 '16 at 10:17
• You have lots of such bijections, and you seems to seek very specific ones, in order to be able to handle with the parametrization given in your summations. Do you have any example of what is disturbing you? – Desiderius Severus Dec 18 '16 at 10:18
• @Wojowu: sure, fair enough, I'd agree with that. – Alex Wertheim Dec 18 '16 at 10:18
• @Wojowu A better change would be to replace "any" with "some." Though, excluding endpoints once you have "some," it is easy to find "any." And yes, it would definitely be a countable set. – Hans Musgrave Dec 19 '16 at 19:49

There are other posts showing ${sin (n)}$ is dense in [-1;1] Though I don't know if it is bijective.
Depending on whether you take $0$ as a member of $\mathbb N$ or not, this is an example for $[0,1)$ or $(0,1)$, pick as you wish.
The idea is to take a decimal expansion of an integer, "flip it around" and get a decimal fraction. This is best illustrated with an example: $$1\mapsto 0.1\\ 123\mapsto 0.321\\ 100000\mapsto 0.000001\\ 49378100\mapsto 0.00187394\\ 0\mapsto 0.0$$ The reason we flip the expansion is so that we don't have collisions like $10$ and $1000$ leading to $0.10=0.1000$. If you want to be specific, you can write it like this: $$a_na_{n-1}\dots a_1\mapsto 0.a_1a_2\dots a_n$$ where $a_i$ are digits. It's easy to see this is a bijection between $\mathbb N$ and the set of finite decimal fractions in an interval, and the latter is just as easily seem to be dense.
• This still is not quite what I was looking for in that the function described is a complicated expression in terms of your input $n$, even though it is easy to understand and apply (and also clever, at least in my opinion). Roughly, the problem is if $n$ is a natural, let $f(n)$ denote the unique element of the aforementioned dense, countable set $A$ corresponding to $n$, then there is another fixed function $g:A\rightarrow[0,\infty)$ such that $\sum_{n\in\mathbb{N}}g(f(n))$ is easily related to an easily computable integral. – Hans Musgrave Dec 19 '16 at 20:02
• The example of $f$ you gave is simple, but does not relate to common functions in a way which makes $g(f(n))$ likely to relate to anything most people would care about (exponentials, trigonometric functions, etc...). – Hans Musgrave Dec 19 '16 at 20:02