# Thread: Challenge problem #6 [GLaw]

1. ## Challenge problem #6 [GLaw]

Let $a_1=b_1=1$ and define sequences $a_n$ and $b_n$ recursively by

$\displaystyle a_{n+1}\ =\ a_n-b_n$

$\displaystyle b_{n+1}\ =\ a_n+b_n$

Thus

$\displaystyle a_2=a_1-b_1=0,\ b_2=a_1+b_1=2$

$\displaystyle a_3=a_2-b_2=-2,\ b_3=a_2+b_2=2$

and so on.

Find an explicit formula for $a_n$ and for $b_n$ in terms of $n$.

2. ## Re: Challenge problem #6 [GLaw]

Spoiler:
$a_n = Re\{(1+i)^n\}$

$b_n = Im \{(1+i)^n\}$

3. ## Re: Challenge problem #6 [GLaw]

Look at the sequence $\displaystyle a_n$ = {1, 0, -2, -4, -4, 0, 8, 16, 16, 0, -32, -64,.....}
we notice that it comes in blocks of four numbers each being (-4) times the corresponding number in the previous block
this means

$\displaystyle a_{n+4}=-4a_n$
Proof:

$\displaystyle a_{n+2}=a_{n+1}-b_{n+1}=\left(a_n-b_n\right)-\left(a_n+b_n\right)=-2b_n$

$\displaystyle a_{n+4}=-2b_{n+2}=-2\left(a_{n+1}+b_{n+1}\right)=-4a_n$

so that's one recurrence relation with one variable with four initial conditions

solution: $\displaystyle a_n=2^{n/2} \cos \left(\frac{n \pi }{4}\right)$

similarly $\displaystyle b_n=2^{n/2} \sin \left(\frac{n \pi }{4}\right)$

4. ## Re: Challenge problem #6 [GLaw]

Great job. My solution:

Spoiler:
$\displaystyle \text{Let}\ z_n=a_n+ib_n.$

$\displaystyle \text{Then}\ z_{n+1}=\left(a_n-b_n\right)\,+\,i\left(a_n+b_n) = \left(a_n+ib_n\right)(1+i)=z_nz_1.$

$\displaystyle \therefore\ z_n = \left(\frac{z_n}{z_{n-1}}\right)\left(\frac{z_{n-1}}{z_{n-2}}\right) \cdots \left(\frac{z_2}{z_1}\right)z_1 = z_1^n\ \text{for all}\ n=1,2,\ldots.$

$\displaystyle \text{Now}\ z_1 = 1+i = \sqrt2e^{\frac{\pi}4i}.$

$\displaystyle \therefore\ z_n = \left(\sqrt2\right)^ne^{\frac{n\pi}4i}$

$\displaystyle \implies\ \boxed{a_n = \left(\sqrt2\right)^n\cos\frac{n\pi}4,\quad b_n = \left(\sqrt2\right)^n\sin\frac{n\pi}4}.$