Finding the n'th term of fibonacci like sequence

In summary, the fibonacci sequence can be defined as $${F_n} = {F_{n - 1}} + {F_{n - 2}}$$ and specifying the initial conditions as $$\eqalign{ & {F_1} = 1 \cr & {F_2} = 1 \cr} $$Also, there exists a general formula for the fibonacci which is given by $${F_n} = {{{\varphi ^n} + {\psi ^n}} \over {\sqrt 5 }}$$Where $$\varphi = {{1 + \sqrt 5 } \over 2}$$ and $$\
  • #1
neerajareen
17
0
The fibonacci sequence can be defined as $${F_n} = {F_{n - 1}} + {F_{n - 2}}$$ and specifying the initial conditions as $$\eqalign{
& {F_1} = 1 \cr
& {F_2} = 1 \cr} $$

Also there exists a general formula for the fibonacci which is given by $${F_n} = {{{\varphi ^n} + {\psi ^n}} \over {\sqrt 5 }}$$

Where $$\varphi = {{1 + \sqrt 5 } \over 2}$$ and $$\psi = {{1 - \sqrt 5 } \over 2}$$ .
Ι understand that the derivation of the formula was obtained using generating functions.
My question is that supposing we have a new sequence defined to be $${G_n} = {G_{n - 1}} + {G_{n - 3}}$$ and the initial conditions being:
$$\eqalign{
& {G_1} = 1 \cr
& {G_2} = 1 \cr
& {G_3} = 1 \cr} $$

What’s the formula for the n’th term in the sequence. The generating function for the function is going to be


$$A(x) = {x \over {1 - x - {x^3}}}$$


. But due to the imaginary roots that are present, I am not able to use the method of partial fractions.
Can this method still be used or is there any other method that we can use to get the n’th number of this sequence?
Please help. Thank you
 
Mathematics news on Phys.org
  • #2
neerajareen said:
The fibonacci sequence can be defined as $${F_n} = {F_{n - 1}} + {F_{n - 2}}$$ and specifying the initial conditions as $$\eqalign{
& {F_1} = 1 \cr
& {F_2} = 1 \cr} $$

Also there exists a general formula for the fibonacci which is given by $${F_n} = {{{\varphi ^n} + {\psi ^n}} \over {\sqrt 5 }}$$

Where $$\varphi = {{1 + \sqrt 5 } \over 2}$$ and $$\psi = {{1 - \sqrt 5 } \over 2}$$ .
Ι understand that the derivation of the formula was obtained using generating functions.
My question is that supposing we have a new sequence defined to be $${G_n} = {G_{n - 1}} + {G_{n - 3}}$$ and the initial conditions being:
$$\eqalign{
& {G_1} = 1 \cr
& {G_2} = 1 \cr
& {G_3} = 1 \cr} $$

What’s the formula for the n’th term in the sequence. The generating function for the function is going to be


$$A(x) = {x \over {1 - x - {x^3}}}$$


. But due to the imaginary roots that are present, I am not able to use the method of partial fractions.
Can this method still be used or is there any other method that we can use to get the n’th number of this sequence?
Please help. Thank you

This kind of problem can also be solved with linear algebra. I'll demonstrate with the Fibonnacci problem.

Let [itex]F_{n}[/itex] be the nth term in the Fibonnacci series so that
[itex]F_{n}=F_{n-1}+F_{n-2}[/itex].

Using the identity
[itex]F_{n-1}=F_{n-1}[/itex],
we can express the iteration from one term to the next as a matrix multiplication

[itex]\pmatrix{
F_{n} \cr
F_{n-1} \cr}
=\pmatrix{
1 & 1 \cr
1 & 0 \cr}\pmatrix{
F_{n-1} \cr
F_{n-2} \cr}=\pmatrix{
1 & 1 \cr
1 & 0 \cr}^{2}\pmatrix{
F_{n-2} \cr
F_{n-3} \cr}=\pmatrix{
1 & 1 \cr
1 & 0 \cr}^{n-2}\pmatrix{
F_{2} \cr
F_{1} \cr}=\pmatrix{
1 & 1 \cr
1 & 0 \cr}^{n-2}\pmatrix{
1 \cr
1 \cr}[/itex]

Solving for [itex]F_{n}[/itex] then boils down to figuring out a formula for the nth power of a 2x2 matrix.


Let [itex]A=\pmatrix{
1 & 1 \cr
1 & 0 \cr}[/itex]


The eigenvalues of [itex]A[/itex] are [itex]\eqalign{
& {\lambda_1} = \frac{1+\sqrt{5}}{2} \cr
& {\lambda_2} = \frac{1-\sqrt{5}}{2} \cr}[/itex]

We can diagonalize [itex]A[/itex] , so that it has the form
[itex]A= U \Lambda U^{-1}[/itex]
where [itex]\Lambda=\pmatrix{
\lambda_{1} & 0 \cr
0 & \lambda_{2} \cr}[/itex] is a diagonal matrix,

[itex]\Lambda^{n}=\pmatrix{
\lambda_{1}^{n} & 0 \cr
0 & \lambda_{2}^{n} \cr}[/itex].

Since [itex]U U^{-1} = U^{-1} U = I[/itex],
we have that
[itex]A^{n}= U \Lambda^{n} U^{-1}[/itex]

Knowing that you get [itex]U[/itex] from the diagonalization, you have all the information you need to complete the matrix multiplication to find [itex]F_{n}[/itex].

I believe you will find this procedure to work nicely for your problem, though it's a little more challenging to diagonalize a 3x3 matrix.
 
  • #3
Another method that has a less challenging end step to do by hand is the following (again for the Fibonnaci sequence). Suppose that Hn = xn for some x, and Hn = Hn-1 + Hn-2. Then
[tex] x^n = x^{n-1} + x^{n-2} [/tex]
for all n. Divide both sides by xn-2 and we get
[tex] x^2 = x+1 [/tex]
[tex] x^2 - x -1 = 0 [/tex]
which of course has roots [itex] (1\pm \sqrt{5})/2[/itex]. The relation Hn = Hn-1 + Hn-2 is linear, i.e. if Xn and Yn satisfy it, and a and b are numbers, aXn+bYn satisfies it as well. So Hn can be anything of the form
[tex] H_n = a \left(\frac{1+\sqrt{5}}{2}\right)^n + b\left(\frac{1-\sqrt{5}}{2} \right)^n [/tex]
where a and b are any numbers. If we want Hn to be the Fibonacci sequence, then H1 = H2 = 1 - these give you two equations and two unknowns (a and b) which allow you to solve for a and b, and gives you that formula for Fn (actually I think your formula is missing a minus sign).

You can do the same procedure for your Gn - you'll get three roots because you will be left with a cubic equation, so you'll have three unknowns which makes sense because the first three values of Gn will have to be specified. Unless you have a closed form expression for your roots though you will have some floating point issues if you try to use this to evaluate Gn for really large values of n.
 
  • #4
Maybe diagonalizing a 3x3 matrix in this case wouldn't be so bad.

For this problem we diagonalize the matrix
[itex]B=\pmatrix{
1 & 0 & 1 \cr
1 & 0 & 0 \cr
0 & 1 & 0 \cr}[/itex]

Which comes into play as:

[itex]\pmatrix{
G_{n} \cr
G_{n-1} \cr
G_{n-2} \cr} = \pmatrix{
1 & 0 & 1 \cr
1 & 0 & 0 \cr
0 & 1 & 0 \cr}\pmatrix{
G_{n-1} \cr
G_{n-2} \cr
G_{n-3} \cr} =\pmatrix{
1 & 0 & 1 \cr
1 & 0 & 0 \cr
0 & 1 & 0 \cr}^{n-3}\pmatrix{
G_{3} \cr
G_{2} \cr
G_{1} \cr}=\pmatrix{
1 & 0 & 1 \cr
1 & 0 & 0 \cr
0 & 1 & 0 \cr}^{n-3}\pmatrix{
1 \cr
1 \cr
1 \cr}[/itex]

but then, you'd still have to solve a cubic equation
[itex]\lambda^{3}-\lambda^{2}-1=0[/itex]
to find the eigenvalues. There are no rational roots to this equation, so solving it on paper without a copy of the cubic formula would be a challenge. A fun challenge.
 
  • #5


I would suggest using a different approach to finding the formula for the n'th term in this new sequence. Instead of trying to manipulate the generating function, we can look for patterns and use mathematical reasoning to derive the formula.

Firstly, we can rewrite the sequence as $${G_n} = {G_{n-1}} + {G_{n-3}} = {G_{n-2}} + {G_{n-3}} + {G_{n-3}} = 2{G_{n-3}} + {G_{n-2}}$$

We can see that the sequence follows a similar pattern as the fibonacci sequence, where the n'th term is the sum of the two previous terms. However, in this case, we have an additional term that is twice the term three positions before the n'th term. This leads us to the general formula for the n'th term in this sequence:

$${G_n} = {{1 + \sqrt 5 } \over 2}{G_{n-1}} + {{1 - \sqrt 5 } \over 2}{G_{n-2}} + 2{G_{n-3}}$$

We can also simplify this formula by substituting the initial conditions given in the question:

$${G_n} = {{1 + \sqrt 5 } \over 2}{G_{n-1}} + {{1 - \sqrt 5 } \over 2}{G_{n-2}} + 2{G_{n-3}}$$
$$= {{1 + \sqrt 5 } \over 2}{G_{n-1}} + {{1 - \sqrt 5 } \over 2}{G_{n-2}} + 2({G_{n-4}} + {G_{n-5}})$$
$$= {{1 + \sqrt 5 } \over 2}{G_{n-1}} + {{1 - \sqrt 5 } \over 2}{G_{n-2}} + 2{G_{n-4}} + 2{G_{n-5}}$$
$$= {{1 + \sqrt 5 } \over 2}{G_{n-1}} + {{1 - \sqrt 5 } \over 2}{G_{n-2}} + {{1 + \sqrt
 

1. What is a Fibonacci-like sequence?

A Fibonacci-like sequence is a series of numbers in which each number is the sum of the two preceding numbers. The most famous example is the Fibonacci sequence, where the first two numbers are 0 and 1, and each subsequent number is the sum of the two previous numbers (0, 1, 1, 2, 3, 5, 8, 13, etc.). However, there are many other sequences that follow this pattern, such as the Lucas sequence and the Pell sequence.

2. How do you find the n'th term of a Fibonacci-like sequence?

To find the n'th term of a Fibonacci-like sequence, you can use a formula based on the general pattern of the sequence. For example, in the Fibonacci sequence, the formula is Fn = Fn-1 + Fn-2, where Fn represents the n'th term and Fn-1 and Fn-2 represent the two preceding terms. This formula can be adapted for other Fibonacci-like sequences as well.

3. Can you calculate the n'th term of a Fibonacci-like sequence without using a formula?

Yes, it is possible to calculate the n'th term of a Fibonacci-like sequence without using a formula. This can be done by manually finding the sequence and then identifying the pattern or by using a computer program to generate the sequence and find the n'th term. However, using a formula is often faster and more efficient.

4. Are there any real-world applications of Fibonacci-like sequences?

Yes, Fibonacci-like sequences have many real-world applications in fields such as mathematics, biology, and computer science. In mathematics, they are used in number theory and combinatorics. In biology, they can be found in the growth patterns of many plants and animals. In computer science, they are used in algorithms and coding.

5. Is there a limit to how large the n'th term of a Fibonacci-like sequence can be?

There is no limit to how large the n'th term of a Fibonacci-like sequence can be. As the sequence goes on, the numbers will continue to grow exponentially, with each successive term being larger than the previous one. However, the larger the n'th term becomes, the more difficult it is to calculate or predict with accuracy.

Similar threads

Replies
1
Views
943
  • General Math
Replies
7
Views
2K
Replies
7
Views
1K
  • General Math
Replies
3
Views
2K
  • General Math
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
267
  • General Math
Replies
1
Views
1K
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
322
Replies
11
Views
1K
Back
Top