fibonacci: Computes the Fibonacci sequence up to given value of n.

Description Usage Arguments Value References Examples

Description

The Fibonacci sequence is defined by a recurrence relation where f_n denotes the series up to n points.

f_n = f_{n-1} + f_{n-2}

With initial coniditions:

f_1 = 1, \qquad f_2 = 2

Usage

1

Arguments

n

Integer designating the stopping point of the Fibonacci sequence

Value

array of the Fibonacci sequence up to n.

References

Moler, C. (2011). Numerical computing with MATLAB (1st ed.). Philadelphia, Pa: Society for Industrial & Applied Mathematics.

Examples

1

aschleg/numberr documentation built on May 14, 2019, 10:31 a.m.