Closed sequence for an alternating pattern

63 Views Asked by At

I know that for a simple sequence like 1,2,4,8,16 it can be represented as a closed sequence

$ x_n = 2^n$

Is it possible to represent a number sequence where you alternate between adding $a$ and multiplying by $m$ as a closed sequence?

eg, The sequence 1,3,6,8,16,18 alternates between adding 2 and multiplying by 2

Can this be expressed in terms of $x_n$ with adder $a$ and multiplier $m$?

2

There are 2 best solutions below

0
On

Best I can do: $$ a_n = \begin{cases} 5\times 2^k-4, & \text{if $n=2k$ } \\ 5\times 2^k-2, & \text{if $n=2k+1$} \end{cases}$$

Proof: clearly $a_0=1,a_1=3$ as desired. We also remark that $a_{2k+1}=a_{2k}+2$ as desired. All that remains is to show that $$a_{2k}=5\times 2^k-4=2\times\left(5\times2^{k-1}-2\right)=2\times a_{2(k-1)+1}$$ and we are done.

0
On

Consider every other term (indexing starts at $t_0=1$),

$$t_{2n+2}=2(t_{2n}+2).$$

Then with $t_{2n}=u_{2n}-4$,

$$u_{2n+2}-4=2(u_{2n}-4+2)$$ or $$u_{2n+2}=2u_{2n},$$

by induction and using $u_0=5$,

$$u_{2n}=5\cdot2^n,$$

$$t_{2n}=5\cdot2^n-4$$

and

$$t_{2n+1}=5\cdot2^n-2.$$


If you want a single formula,

$$t_m=5\cdot2^{\lfloor m/2\rfloor}-4+2(m\bmod2).$$