The On-Line Encyclopedia of Integer Sequences (OEIS) is an online database of integer sequences. Originally founded by Neil Sloane in 1964, OEIS has evolved into a larger community based project that today contains information records on over 280,000 sequences. Each record contains information on the leading terms of the sequence, keywords, mathematical motivations, literature links, and more - there’s even Maple code to reproduce many of the sequences!

You can read more about the OEIS project on the main site, or on Wikipedia. There have also been several articles written about the OEIS project; here’s a (somewhat) recent article on Building a Searching Engine for Mathematics that gives a little more history on the project.

I wrote a simple package for Maple that can be used to search OEIS for a sequence of numbers or a string and retrieve information on various integer sequences. You can interact with the OEIS package using the commands: Get, Search or Print, or using the right-click context menu.

Here are some examples:



Search for a sequence of 6 or more numbers (note that you can also just right-click on an integer sequence to run the search):

Search(0, 1, 1, 2, 4, 9, 20);
    6 results found
             81, 255636, 35084, 58386, 5908, 14267


Retrieve information on the integer sequence A000081. By default, this returns the data as a JSON string and stores the results in a table:

results81 := Get(81):
    ["revision"], ["number"], ["formula"], ["offset"], ["example"], ["keyword"], ["id"], ["xref"], ["data"], ["reference"], ["mathematica"], ["maple"], ["created"], ["comment"], ["references"], ["time"], ["link"], ["author"], ["program"], ["name"]


Entries in the table can be accessed as follows:

    "_N. J. A. Sloane_"


I’ve also added some functionality for printing tables containing information on integer sequences. The Print command displays an embedded table containing all or selected output from records. For example, say we search for a sequence of numbers:

Search(0, 1, 1, 2, 4, 9, 20);
    6 results found
             81, 255636, 35084, 58386, 5908, 14267


Let’s print out selected details on the first three of these sequences (including Maple code if available):

Print([81, 255636, 35084], output = ["author", "name", "data", "maple"]);


The OEIS API is somewhat limited, so I have had to put some restrictions in place for returning results. Any query that returns more than 100 entries will return an error and a message to provide a more precise specification for the query. Also, in order to reduce the number of search results, the Search command requires at least 6 integers.


You can install the OEIS package directly from the MapleCloud or by running:



Comments and feedback are welcome here, or on the project page:

Please Wait...