# What is the next number in this sequence 1, 1, 3, 2, 4, 6, 5, 25?

Jul 30, 2015

$27$

#### Explanation:

This is not a very mathematically significant kind of sequence.

The steps are:

1) Square the previous term.
2) Add 2 to the previous term.
3) Subtract 1 from the previous term.
(repeat)

Is there a single algebraic formula to describe this iterative process?

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)} {a}_{i}^{2} + \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 work out as $0$, $1$ and $0$.

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

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

Jul 31, 2015

anything you want it to be

#### Explanation:

Since the given sequence is obviously not arithmetic, geometric, nor exponential
one (?obvious?) solution would be to generate a polynomial function with these values as the function values for their position in the sequence:
$\textcolor{w h i t e}{\text{XXXX}}$$f \left(1\right) = 1$
$\textcolor{w h i t e}{\text{XXXX}}$$f \left(2\right) = 1$
$\textcolor{w h i t e}{\text{XXXX}}$$f \left(3\right) = 3$
$\textcolor{w h i t e}{\text{XXXX}}$$f \left(4\right) = 2$
and so on.

Given a set of $n$ data points (with no duplication of the $x$ value) it is always possible to generate a polynomial of degree $n$ or greater that passes through each of the points.

Jul 31, 2015

151?

#### Explanation:

As Alan says, you can construct a polynomial of degree $n$ for any sequence of $n$ values. Actually, degree $n - 1$ is sufficient.

Let's look at the differences and differences of differences... We can use the first element of each row of differences (as enclosed by the green rectangle) to construct a polynomial for the sequence:

a_n = 1/(0!) + (0*n)/(1!) + (2*n(n-1))/(2!)-(5*n(n-1)(n-2))/(3!)+(11*n(n-1)(n-2)(n-3))/(4!)-(20n(n-1)(n-2)(n-3)(n-4))/(5!)+(29*n(n-1)(n-2)(n-3)(n-4)(n-5))/(6!)-(11n(n-1)(n-2)(n-3)(n-4)(n-5)(n-6))/(7!)

If a sequence was really constructed using a polynomial then you would expect to encounter a row of $0$'s somewhat earlier, giving a simpler polynomial.

In our case that does not happen, but see what happens when we add an extra row and reconstruct the next term of the sequence. It's somewhat easier than substituting $8$ into the polynomial.

So for the polynomial of lowest degree that generates the sequence as given, the next term would be $151$. But as Alan says, you could choose any value and make a polynomial to fit.