Let's define a sequence of positive integers. We will define the sequence on even numbers to be double the previous term. The odd indices of the sequence will be smallest positive integer not yet appearing in the sequence.
Here are the first couple terms.
You can also think of this as the list of concatenated pairs (n,2n) where n is the least unused positive integer so far.
Given a number n as input calculate the nth term in this sequence.
This is code-golf so you should aim to minimize the size of your source code as measured in bytes.