## ganeshie8 one year ago Identify a reasonable pattern and find a formula for $$n$$ th term of the sequence : $\large -3,~21,~3,~129,~147,\ldots$

1. amistre64

we can build a degree 4 (maybe?) polynomial :)

2. ganeshie8

haha sure guess we can do that with any sequence, including $1,~1,~2,~3,~5,~8,~13,~\cdots$ ;p

3. amistre64

i actually reworked the closed form of the fibber today :)

4. ganeshie8

the sequence in question is fibonacci like one.. but identifying the pattern might be tough as there is no uniq answer yeah

5. amistre64

if i toss in a switch function, then for all points in the ... it can be zero or even some other function to turn on ;)

6. amistre64

so your pattern is what, an alternating sign fibber?

7. amistre64

well, not precise

8. ganeshie8

was hoping to work it using $u_n = Au_{n-1}+Bu_{n-2}$ where $$A$$ and $$B$$ are constants

9. amistre64

what have you determined to be your recursive form?

10. ganeshie8

exercise 15B / last problem http://www.cimt.plymouth.ac.uk/projects/mepres/alevel/discrete_ch15.pdf

11. ganeshie8

$u_n = u_{n-1}+6u_{n-2}$ http://www.wolframalpha.com/input/?i=solve+3+%3D+21x-3y%2C+129%3D3x%2B21y

12. amistre64

ok, you already have the recursion ... i just figured it out lol

13. amistre64

-3 21 3 129 147 -3x + 21y = 3 21x + 3y = 129 6x+y 6(3)+129 = 147

14. amistre64

might be easier to work like this tho f(n+2) = 6 f(n+1) + f(n) f(n+2) - 6 f(n+1) - f(n) = 0 let f(n) = x^n x^(n+2) - 6 x^(n+1) - x^(n) = 0 x^(n) (x^2 - 6x - 1) = 0 what are the roots of our quadratic?

15. amistre64

i think my 6 is in the wrong spot tho ... didnt double check to see if my fingers were behaving

16. ganeshie8

f(n+2) = f(n+1) + 6f(n) right

17. ganeshie8

x^2 - x - 6 = 0 x = 3, -2

18. amistre64

since 3^n and (-2)^n are linearly independant, then we can form a ... linear combination of the solutions as: A3^n + B(-2)^n and setup a system of 2 equations in 2 unknowns do we like to start with n=0 or n=1?

19. ganeshie8

0 i guess, the trick part is identifying a pattern and after that finding the general solution is pretty straightforward!

20. amistre64

:) yeah A+B = -3 3A -2B = 21

21. amistre64

2A+2B = -6 3A -2B = 21 ----------- 5A = 15 A = 3, so B = -9

22. amistre64

we can chk with the wolf: table [3(3^n)-9(-2)^n,{n,10}]

23. ganeshie8

*B = -6 $u_n = 3^{n+1}-6(-2)^{n}$

24. amistre64

lol ... fine we will use -6 instead :)

25. amistre64

... wow, he can solve a closed form for some random fibber sequence, but that addition really throws him for a loop ;)

26. ganeshie8

checks out wid wolf ! http://www.wolframalpha.com/input/?i=Table%5B3%5E%28n%2B1%29-6%28-2%29%5En%2C+%7Bn%2C0%2C4%7D%5D i use to do these problems using generating functions, they're long but they gave nice practice with power series

27. amistre64

i cant say that i have played with generating functions much, if at all.

28. ikram002p

is it unique ?

29. amistre64

well i can tell you using -9 doesnt work .. so im gonna say yes :)

30. ikram002p

well :P

31. ganeshie8

using generating functions \begin{align}G(x) &= u_0+u_1x+u_2x^2+u_3x^3+\cdots\\~\\ &=-3 + 21x + (u_1+6u_0)x^2 + (u_2+6u_1)x^3 + \cdots \\~\\ &=-3+21x+x(u_1x+u_2x^2+\cdots) + 6x^2(u_0+u_1x+\cdots)\\~\\ &=-3+21x+x(G(x)-u_0) + 6x^2G(x)\\~\\ \end{align} \implies G(x)[1-x-6x^2]=-3+21x-u_0x\\~\\ \begin{align}\implies G(x) &= \dfrac{-3+24x}{1-x-6x^2} \\~\\ &= \dfrac{3}{1-3x}-\dfrac{6}{1+2x}\\~\\ &=3\sum\limits_{n=0}^{\infty} (3x)^n-6\sum\limits_{n=0}^{\infty} (-2x)^n\\~\\ &=\sum\limits_{n=0}^{\infty} \left[\color{blue}{3^{n+1}-6(-2)^n}\right] x^n \end{align}