Function that generates 2 indexes for nested subsets

26 Views Asked by At

I'm doing a problem and looking for some way to create a specific bijection between $\mathbb{N}$ and my set $W$. $W$ is a set that contains infinite subsets $Y_n$. Each of these subsets contains every subset of $\mathbb{N}$ that adds up to $n$. I already know that each set $Y_n$ contains $\frac{n+ (n \mod 2)}{2}$ many subsets, which means that I basically already have the 2nd index which indexes the sets within $Y_n$. Now the first index needs to follow the following pattern:

x n for $Y_n$
1 1
2 2
3 3
4 3
5 4
6 4
7 5
8 5
9 5

It follows this pattern: https://i.stack.imgur.com/BujFv.jpg

Does this function exist at all? If not, what could be some alternatives?