Learn R Programming

gmp (version 0.2-2)

lucnum: Compute Fibonacci and Lucas numbers

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: $F_n=F_{n-1}+F_{n-2}$ Lucas numbers are define by: $L_n=F_n+2F_{n-1}$

Usage

fibnum(n)
fibnum2(n)
lucnum(n)
lucnum2(n)

Arguments

n
Integer

Value

  • Fibonacci numbers and Lucas number.

References

Gnu MP Library see http://swox.com/gmp, Home page: http://mulcyber.toulouse.inra.fr/projects/gmp/[object Object]

fibnum(10) fibnum2(10) lucnum(10) lucnum2(10) arith