# What is the pattern in the sequence 1 2 4 3 6 8 7 14 16?

Jul 31, 2015

Double, Add 2, Subtract 1, Repeat.

#### Explanation:

Not a very mathematically significant sequence, but can you express it algebraically with a single formula?

Consider $\omega = - \frac{1}{2} + i \frac{\sqrt{3}}{2}$

This has the property that ${\omega}^{3} = 1$

Then we can write:

${a}_{0} = 1$

${a}_{i + 1} = \frac{\left({\omega}^{i} - \omega\right) \left({\omega}^{i} - {\omega}^{2}\right)}{\left(1 - \omega\right) \left(1 - {\omega}^{2}\right)} 2 {a}_{i} + \frac{\left({\omega}^{i} - {\omega}^{2}\right) \left({\omega}^{i} - 1\right)}{\left(\omega - {\omega}^{2}\right) \left(\omega - 1\right)} \left({a}_{i} + 2\right) + \frac{\left({\omega}^{i} - 1\right) \left({\omega}^{i} - \omega\right)}{\left({\omega}^{2} - 1\right) \left({\omega}^{2} - \omega\right)} \left({a}_{i} - 1\right)$

This can be simplified, but it helps to have it in this formulation so you can understand how it works.

When $i = 0$ modulo $3$, then:

$\frac{\left({\omega}^{i} - \omega\right) \left({\omega}^{i} - {\omega}^{2}\right)}{\left(1 - \omega\right) \left(1 - {\omega}^{2}\right)} = \frac{\left(1 - \omega\right) \left(1 - {\omega}^{2}\right)}{\left(1 - \omega\right) \left(1 - {\omega}^{2}\right)} = 1$

$\frac{\left({\omega}^{i} - {\omega}^{2}\right) \left({\omega}^{i} - 1\right)}{\left(\omega - {\omega}^{2}\right) \left(\omega - 1\right)} = \frac{\left(1 - {\omega}^{2}\right) \left(1 - 1\right)}{\left(1 - {\omega}^{2}\right) \left(\omega - 1\right)} = 0$

$\frac{\left({\omega}^{i} - 1\right) \left({\omega}^{i} - \omega\right)}{\left({\omega}^{2} - 1\right) \left({\omega}^{2} - \omega\right)} = \frac{\left(1 - 1\right) \left(1 - \omega\right)}{\left({\omega}^{2} - 1\right) \left({\omega}^{2} - \omega\right)} = 0$

When $i = 1$ modulo $3$, then these coefficient expressions evaluate as $0$, $1$ and $0$.

When $i = 2$ modulo $3$, then these coefficient expressions evaluate as $0$, $0$ and $1$.

So we use these to pick out each of the three rules cyclically.