Skip to content
A function to find the nth term of a sequence.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
node_modules
test
LICENSE
README.md
index.js
package.json

README.md

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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.