A common term for $a_n=\begin{cases} 2a_{n-1} & \text{if } n\ \text{ is even, }\\ 2a_{n-1}+1 & \text{if } n\ \text{ is odd. } \end{cases}$ When I was answering a question here, I found a sequence as a recursive one as given below. 
$a_1=1$, and for $n>1$, 
$$a_n=\begin{cases}
2a_{n-1} & \text{if } n\ \text{ is even, }\\
2a_{n-1}+1 & \text{if } n\ \text{ is odd. }
\end{cases}$$
I need to find a common term for this sequence. For example, for the sequence $a_1=2$ and $a_n=2a_{n-1}$, for $n>1$, the common term is $a_n=2^n$.
I appreciate any answer or hint in advance.

It can often be helpful to just write out the first couple of terms:
$$\begin{align}
a_1 &= 1 \\
a_2 &= 2 \\
a_3 &= 5 = 2^2 + 1\\
a_4 &= 10 = 2^3 + 2 \\
a_5 &= 21 = 2^4 + 5 = 2^4 + 2^2 + 1\\
a_6 &= 42 = 2^5 + 10 = 2^5 + 2^3 + 2\\
a_7 &= 85 = 2^6 + 21 = 2^6 + 2^4 + 5 = 2^6 + 2^4 + 2^2 + 1\\
a_8 &= 170 = 2^7 + 42 = 2^7 + 2^5 + 10 = 2^7 + 42 = 2^7 + 2^5 + 2^3 + 2
\end{align}
$$
Do you see a pattern? You basically just need to find an expression changing between $1$ and $2$.
