Connects and extracts information from the OEIS database located at http://oeis.org
Assuming methodname is the method you wish to use:
var method = require('oeis').methodname;
import methodname from 'oeis';
searchBySequence
: search for a number sequenceParameter: Array for the sequence, optional integer for the search start
Returns: Promise (resolving an object, rejecting an HTTP error)
Example:
oeis.searchBySequence([1,1,2,3,5]) .then((obj) => console.log(obj));
searchByID
: search for a specific sequence by IDInput: integer
Returns: Promise (resolving an object, rejecting an HTTP error)
Example:
oeis.searchByID(42) .then((obj) => console.log(obj));
plot
: returns a HTML or PNG plot of a sequence by numberInput: integer (sequence number), boolean (whether to return PNG)
Returns: Promise (resolving HTML or PNG data, rejecting an HTTP error)
Example:
oeis.plot(42, true) .then((pngData) => console.log(pngData));
Written by Dan Dart npm@dandart.co.uk
I stole the endpoints from this Stack Overflow post: