Out of pure interest, I would like to be able to construct a sequence as such:
1, 2, 4, 6, 3, 8, 10, 12, 5, 14, 16 ,18, 7, ...
Thus an odd number, followed by three even numbers, followed by an odd number, and so on. Furthermore, all numbers are used exactly once and are in ascending order of numbers not yet used. In particular, I want some "closed" formula that will give me this sequence.
Suppose I have such a closed form. Then the question arises, can I construct a general "closed" formula that will produce a sequence of $n$ even numbers, followed by $m$ odd numbers, while still abiding to the acending numbers property and such that each number is also used only once?
I would really appreciate some help or insight on how to tackle this problem. Of course, other generalisations are possible (for other sets or subsets, other "rules" for the sequence) and I am also interested in those, but I would like to get a grasp on this idea first.