Arith Fibonacci

Aus ExpeccoWiki

Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Schema

Arith fibonacci.jpg

Operation

Fibonacci expects a single integer input, and returns the n'th number from the list of fibonacci numbers (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946...).
Fibonacci numbers are computed as:
fib(n) := fib(n-1) + fib(n-2) with: fib(1) := 1 fib(2) := 1.

The result is always an Integer number.

Errors

Raises an error for an input value less than 1 (there is no 0's fibonacci number).

Uses

Fibonacci numbers are often used in the area of statistics and combinatorics.

Examples

The 10th fibonacci number is 55

The 1000th fibonacci is 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875

The 10000th fibonacci number has 2090 digits and starts with "3364476487643178326662161200510754331..."

Revisions

This block has been in the Standard Library since 1.7.1.



Back to Standard Library.
Previous: Arith [ Binomial Coefficient ]
Next: Arith [ Factorial ]


Meine Werkzeuge