1.0.1 • Published 6 months ago

nth-term-fibonacci v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

fibonacci

Module for node.js that takes in an integer n between 1 and 20000 as the argument, and returns the nth number in the fibonacci sequence The fibonacci sequence is a set of numbers that start with a zero, followed by a one , and proceeds based on the rule that each number is equal to the sum of the proceeding two numbers

Usage

Just one

Find the 3rd number of the fibonacci sequence:

const fibonacci = require ('nth-term-fibonacci');
for(let i=1; i<30; i++){
    console.log(fibonacci.term(i))
}

Result:

0
1
1
2
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
6765
10946
17711
28657
46368
75025
121393
196418
317811

Author

Shizuo

1.0.1

6 months ago

1.0.0

6 months ago