Function Repository Resource:

OEISLookup

Source Notebook

Look up a sequence of numbers on the Online Encyclopedia of Integer Sequences (OEIS)

Contributed by: Peter Cullen Burbery

ResourceFunction["OEISLookup"][seq]

looks up the sequence of numbers seq on the Online Encyclopedia of Integer Sequences.

Details

OEISLookup uses the OEIS's JSON API.
This function requires an Internet connection to work.

Examples

Basic Examples (4) 

Look up the sequence of prime numbers:

In[1]:=
data = ResourceFunction["OEISLookup"][Prime[Range[20]]]
Out[1]=

Query the first result:

In[2]:=
res = First[data]
Out[2]=

Get the first matching sequence:

In[3]:=
res["Sequence"]
Out[3]=

Get the names of all matching sequences returned:

In[4]:=
#["Name"] & /@ data
Out[4]=

Applications (1) 

An example from the page Hints for Using On-Line Encyclopedia of Integer Sequences (or OEIS). Lookup the sequence of integers:

In[5]:=
data = ResourceFunction["OEISLookup"][{2, 4, 9, 21, 51, 127}]
Out[5]=

Properties and Relations (2) 

If you know the A number you can use the resource functions OEISSequence and OEISSequenceData:

In[6]:=
ResourceFunction["OEISSequence"]["A001006"]
Out[6]=
In[7]:=
ResourceFunction["OEISSequenceData"]["A001006", "Sequence"]
Out[7]=

You can look up other properties with OEISSequenceData:

In[8]:=
ResourceFunction["OEISSequenceData"]["A001006", "Name"]
Out[8]=

Publisher

Peter Burbery

Version History

  • 1.0.0 – 18 August 2023

Source Metadata

Related Resources

License Information