1.0.3 • Published 7 years ago
nthterm v1.0.3
nthterm
A function to find the nth term of a sequence.
Usage
var nthterm = require('nthterm');
// Linear
nthterm([1, 2, 3]); //=> n
nthterm([5, 7, 9, 11, 13]); //=> 2n+3
// Works with quadratics, too!
nthterm([4, 8, 14, 22]); //=> n²+n+1