cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Undocumented function fibonacci

LucMeekes
23-Emerald III

Undocumented function fibonacci

Can anybody explain what the function fibonacci (undocumented, symbolic only, Mathcad 11) does?

 

LucMeekes_0-1664880181557.png

 

It accepts more than one argument, but only the first appears to be observed.

Luc

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:Werner_E)

Thanks, Good catch! but missed one:

LucMeekes_0-1664912404800.png

Solved with:

LucMeekes_1-1664912475667.png

Unfortunately matrices get (too) big:

LucMeekes_2-1664912546002.png

(No symbolic result was found).

 

Further, returning to:

LucMeekes_3-1664913707661.png

In other words,

Fib(n,2) = Fib(3,n-1) gives the n'th term of the fibonacci series.

Fib(n,2) is the better choice, because it keeps the matrix small:

LucMeekes_4-1664914039917.png

The other series can be searched in the Online Encyclopedia of Integer Sequences:

1,1,3,7,17,41,99,239 is Numerators of continued fraction convergents to sqrt(2).

 

Luc

 

View solution in original post

4 REPLIES 4

It looks to me that the Maple help here

https://www.maplesoft.com/support/help/maple/view.aspx?path=combinat%2Ffibonacci

explains it. What MC11 shows may have to do with the matrix A^n binary powered mentioned in the help even though I don't see why and how the matrix should grow that way - an intermediate result of the binary exponentiation, not supposed to bubble up to the surface?

Werner_E_0-1664883977455.png

It looks like the number of rows (and columns) of the matrices you show correspond to the fibonacci numbers.
Whats the result of fibonacci (3,x)->  ?

 

Needless to say that fibonacci(,,) is not present in MC15 or Prime which use different symbolic engines,

LucMeekes
23-Emerald III
(To:Werner_E)

Here is:

LucMeekes_0-1664896610914.png

As indicated, the function allows many parameters, but only observes the first:

LucMeekes_1-1664896668222.png

I think you have an error in your fib() function, fib(0) should be 0, not 1. According to the definition (?) the sequence is:

0,1,1,2,3,5,8,13,21,34,55 (see your link).

I get to fibonacci numbers with a  simpler expression:

LucMeekes_8-1664899186245.png

But now I can replace the 2x2 matrix with fibonacci(m) and introduce a second parameter, which for m=2 gives the 'normal' fibonacci numbers:

LucMeekes_10-1664899332312.png

 

(For m < 2, the result is always 1 for any integer number n),

As stated above, m must be integer (too), so it seems not related to the x in the Maple article.

 

Luc

 

 

 

 

 

According my fib function - I simply was to lazy to nest another if-function 😉

With the undocumented function fib(n):=rows(fibonacci(n))*(n>0) should do the job, too.

LucMeekes
23-Emerald III
(To:Werner_E)

Thanks, Good catch! but missed one:

LucMeekes_0-1664912404800.png

Solved with:

LucMeekes_1-1664912475667.png

Unfortunately matrices get (too) big:

LucMeekes_2-1664912546002.png

(No symbolic result was found).

 

Further, returning to:

LucMeekes_3-1664913707661.png

In other words,

Fib(n,2) = Fib(3,n-1) gives the n'th term of the fibonacci series.

Fib(n,2) is the better choice, because it keeps the matrix small:

LucMeekes_4-1664914039917.png

The other series can be searched in the Online Encyclopedia of Integer Sequences:

1,1,3,7,17,41,99,239 is Numerators of continued fraction convergents to sqrt(2).

 

Luc

 

Top Tags