Let's define a sequence of positive integers. We will define the value of the sequence at every even index 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.
1,2,3,6,4,8,5,10,7,14,9,18,11,22,12,24,13,26,15,30
You can also think of this as the list of concatenated pairs (n,2n) where n is the least unused positive integer so far.
Task
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.