Library containing functions for generating and extracting n'th number of a selection of popular number sequences.
Currently containing:
- Recaman sequence
- recaman(n) : returns n'th number.
- recamanSequence(n) : returns an array of 0...n numbers.
- Fibonacci sequence
- fibonacci(n) : returns n'th number.
- fibonacciSequence(n) : returns an array of 0...n numbers.
- Lucas sequence
- lucas(n) : returns n'th number.
- lucasSequence(n) : returns an array of 0...n numbers.
npm install int-seq-generator --save
import intseq from 'int-seq-generator';
intseq.recaman(5); // 7
intseq.fibonacciSequence(10); // [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
**OR**
import {recaman} from 'int-seq-generator';
recaman(1); // 1