# Explicit formula for sequence with parity-based recursion

How do we find an explicit formula for the sequence $(a_i)_{i=1}^\infty$ in terms of $a_1=C$ if

$$a_{i+1}=\begin{cases} a_i-13 & i \text{ even}, \\ 2a_i & i \text{ odd}.\end{cases}\quad i\ge2 \; ?$$

-
Note that parity alternates every term, so you can rewrite every other term as a simple linear recurrence: $b_{i} = 2b_{i-1}-26$ –  user7530 Mar 21 '12 at 22:30
@user7530 - Thank you very much –  Victor Mar 21 '12 at 22:31

One approach is to define $b_i=a_{2i+1}, b_1=C, b_{i+1}=2b_i-13, a_{2i}=2b_{i-1}$