Find the $n$th term of $1, 2, 5, 10, 13, 26, 29, ...$ How would you find the $n$th term of a sequence like this?
$1, 2, 5, 10, 13, 26, 29, ...$
I see the sequence has a group of three terms it repeats: Double first term to get second term, add three to get third term, repeat. 
What about: $2, 3, 6, 7, 14, 15, 30,... $?
Again the sequence has a group of three terms it repeats: Add one to first term to get second term, then double second term to get third term. 
How do you compute the $n$th term of such sequences directly, without iterating through all preceding terms?

For the first sequence:
$$S_n = {2}^{(2+\lfloor\frac{n}{2}\rfloor)}+6(\frac{n}{2}-\lfloor\frac{n}{2}\rfloor-1)$$
For example:


*

*$S_1 = 2^2-3 =  1$

*$S_2 = 2^3-6 =  2$

*$S_3 = 2^3-3 =  5$

*$S_4 = 2^4-6 = 10$

*$S_5 = 2^4-3 = 13$

*$S_6 = 2^5-6 = 26$

*$S_7 = 2^5-3 = 29$



For the second sequence:
$$S_n = {2}^{\lceil\frac{n}{2}\rceil}+2(\frac{n}{2}-\lfloor\frac{n}{2}\rfloor-1)$$
For example:


*

*$S_1 = 2^2-2 =  2$

*$S_2 = 2^2-1 =  3$

*$S_3 = 2^3-2 =  6$

*$S_4 = 2^3-1 =  7$

*$S_5 = 2^4-2 = 14$

*$S_6 = 2^4-1 = 15$

*$S_7 = 2^5-2 = 30$

