combinat[fibonacci] - compute Fibonacci numbers or polynomials
|
Calling Sequence
|
|
fibonacci(n)
fibonacci(n, x)
|
|
Parameters
|
|
n, x
|
-
|
algebraic expressions
|
|
|
|
|
Description
|
|
•
|
The call fibonacci(n) computes the nth Fibonacci number F(n), if n is an integer; otherwise it returns unevaluated.
|
•
|
The call fibonacci(n, x) computes the nth Fibonacci polynomial in x if n is an integer; otherwise it returns unevaluated.
|
•
|
The Fibonacci numbers are defined by the linear recurrence
|
•
|
The Fibonacci polynomials are defined similarly by
|
|
Note that .
|
•
|
The generating function for F(n, x) is
|
•
|
The command with(combinat,fibonacci) allows the use of the abbreviated form of this command.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
|
|
Download Help Document
Was this information helpful?