fibonacci: Compute Fibonacci and Lucas numbers

Description Usage Arguments Value Author(s) References Examples

Description

fibnum compute n-th Fibonacci number. fibnum2 compute (n-1)-th and n-th Fibonacci number. lucnum compute n-th lucas number. lucnum2 compute (n-1)-th and n-th lucas number.

Fibonacci numbers are define by: Fn=Fn-1 + Fn-2 Lucas numbers are define by: Ln=Fn + 2Fn-1

Usage

1
2
3
4

Arguments

n

Integer

Value

Fibonacci numbers and Lucas number.

Author(s)

Antoine Lucas

References

The GNU MP Library, see http://gmplib.org

Examples

1
2
3
4
fibnum(10)
fibnum2(10)
lucnum(10)
lucnum2(10)

gmp documentation built on May 19, 2017, 3:32 p.m.

Search within the gmp package
Search all R packages, documentation and source code