1. ## Sequence

Hi all.

This is a simple challenge problem I made up myself. Consider the sequence $\displaystyle \left(a_n\right)=(1,2,6,12,36,72,\ldots).$

The first term is 1, and successive terms are formed by multiplying the previous term by 2 and 3 alternately, starting with 2. Thus

$\displaystyle a_1=1$
$\displaystyle a_2=1\cdot2=2$
$\displaystyle a_3=2\cdot3=6$
$\displaystyle a_4=6\cdot2=12$
$\displaystyle a_5=12\cdot3=36$
$\displaystyle a_6=36\cdot2=72$

and so on.

Prove that

$\displaystyle a_n\ =\ \frac{2\sqrt{6^{n-2}}+\sqrt{6^{n-1}}+(-1)^n\left(2\sqrt{6^{n-2}}-\sqrt{6^{n-1}}\right)}2$

2. isn't $\displaystyle a_n=2^{\lfloor \frac{n}{2} \rfloor} 3^{\lfloor \frac{n-1}{2} \rfloor}$ a better looking formula for your sequence?

3. Originally Posted by NonCommAlg
isn't $\displaystyle a_n=2^{\lfloor \frac{n}{2} \rfloor} 3^{\lfloor \frac{n-1}{2} \rfloor}$ a better looking formula for your sequence?
Hi NonCommAlg.

No, it isn’t.

4. Originally Posted by TheAbstractionist

No, it isn’t.
why not? haha

i have a question for computer programmers: if you had to use one of these two formulas, which one would you choose and why?

5. Originally Posted by NonCommAlg
why not? haha

i have a question for computer programmers: if you had to use one of these two formulas, which one would you choose and why?
well, i'm not a programmer, but your formula would be used i bet. but seeing that this is a challenge problem, your formula seems too intuitively obvious (and probably easy to prove. induction would work, right?). we want to make the students sweat a little bit

6. Originally Posted by Jhevon

but seeing that this is a challenge problem, your formula seems too intuitively obvious (and probably easy to prove. induction would work, right?). we want to make the students sweat a little bit
yeah, it's just a simple induction.

7. Originally Posted by Jhevon
(and probably easy to prove. induction would work, right?).
Spoiler:
and separating the cases n odd, n even... it should be obvious ?

8. We have $\displaystyle a_{n+2}-6a_n=0, \ \forall n\geq 3$

Consider the characteristic equation $\displaystyle x^2-6=0$ with solutions $\displaystyle x_1=-\sqrt{6}, \ x_2=\sqrt{6}$

We try to find the general term $\displaystyle a_n$ as

$\displaystyle a_n=\alpha x_1^n+\beta x_2^n$

where $\displaystyle \alpha, \ \beta$ will be determined knowing the first two terms of the sequence.

Replacing n=1 and n=2 we get $\displaystyle \alpha=\frac{2-\sqrt{6}}{12}, \ \beta=\frac{2+\sqrt{6}}{6}$

Then we replace $\displaystyle \alpha, \ \beta, \ x_1, \ x_2$ and we get the formula for $\displaystyle a_n$

9. Originally Posted by Jhevon
we want to make the students sweat a little bit
Hi Jhevon.

Yes, that’s the point!

10. Originally Posted by red_dog
We have $\displaystyle a_{n+2}-6a_n=0, \ \forall n\geq 3$

Consider the characteristic equation $\displaystyle x^2-6=0$ with solutions $\displaystyle x_1=-\sqrt{6}, \ x_2=\sqrt{6}$

We try to find the general term $\displaystyle a_n$ as

$\displaystyle a_n=\alpha x_1^n+\beta x_2^n$

where $\displaystyle \alpha, \ \beta$ will be determined knowing the first two terms of the sequence.

Replacing n=1 and n=2 we get $\displaystyle \alpha=\frac{2-\sqrt{6}}{12}, \ \beta=\frac{2+\sqrt{6}}{6}$

Then we replace $\displaystyle \alpha, \ \beta, \ x_1, \ x_2$ and we get the formula for $\displaystyle a_n$
Hi red_dog.

Thanks for your solution. Here is mine.

Let $\displaystyle \left(b_n\right)$ and $\displaystyle \left(c_n\right)$ be the odd and even subsequences respectively of $\displaystyle \left(a_n\right).$ Hence $\displaystyle \left(b_n\right)$ and $\displaystyle \left(c_n\right)$ are geometric progressions with common ratio 6:

$\displaystyle b_n\ =\ a_{2n-1}\ =\ 6^{n-1}$
$\displaystyle c_n\ =\ a_{2n}\ =\ 2\cdot6^{n-1}$

Now

$\displaystyle a_n\ =\ \underbrace{\frac{1-(-1)^n}2a_n}_{\mbox{odd terms}}\,+\, \underbrace{\frac{1+(-1)^n}2a_n}_{\mbox{even terms}}$

___$\displaystyle =\ \frac{1-(-1)^n}2b_{\frac{n+1}2}\,+\,\frac{1+(-1)^n}2c_{\frac n2}$

Substituting $\displaystyle b_{\frac{n+1}2}=6^{\frac{n+1}2-1}=\sqrt{6^{n-1}}$ and $\displaystyle c_{\frac n2}=2\cdot6^{\frac n2-1}=2\sqrt{6^{n-2}}$ will give the required formula for $\displaystyle a_n$.

11. I get this part:

However, I don't understand where you got this equation =P

12. Originally Posted by weirdswimguy
I get this part:

However, I don't understand where you got this equation =P

Hi weirdswimguy.

If $\displaystyle n$ is odd, then $\displaystyle \frac{1+(-1)^n}2a_n$ disappears, leaving the other half. If $\displaystyle n$ is even, the other half disappears, leaving this one. Neat, yeah?

This method is very handy for writing down a formula for sequences whose properties alternate between odd and even terms. For example, suppose you have

$\displaystyle (a_n)\ =\ (1,\sqrt2,3,\sqrt4,5,\sqrt6,7,\ldots)$

Here

$\displaystyle b_n=2n-1$
$\displaystyle c_n=\sqrt{2n}$

Hence $\displaystyle a_n=\frac{1-(-1)^n}2b_{\frac{n-1}2}+\frac{1+(-1)^n}2c_{\frac n2}=\frac{\sqrt n+n+(-1)^n(\sqrt n-n)}2$