Wolfram Research

Function Repository Resource:

OEISSequence

Source Notebook

Return the list provided by the OEIS for a given OEIS sequence number

Contributed by: Dmitri Volkov

ResourceFunction["OEISSequence"][string]

gives the list of values provided by the OEIS for OEIS sequence string.

Details and Options

The input should be a seven-character string, consisting of a letter followed by a number with leading zeroes.
This function requires an internet connection.

Examples

Basic Examples

Return OEIS Sequence A000045 (Fibonacci sequence):

In[1]:=
ResourceFunction["OEISSequence"]["A000045"]
Out[1]=

Scope

To get a value of a sequence, index it into the produced list:

In[2]:=
ResourceFunction["OEISSequence"]["A000045"][[5]]
Out[2]=

OEISSequence returns unevaluated when a sequence does not exist in the OEIS:

In[3]:=
ResourceFunction["OEISSequence"]["test"]
Out[3]=

Possible Issues

If internet access to the OEIS is not available, the function will fail to produce the expected result:

In[4]:=
Block[{PacletManager`$AllowInternet = False},
 ResourceFunction["OEISSequence"]["A000045"]]
Out[4]=

Neat Examples

Plot the first nine OEIS sequences:

In[5]:=
ListPlot[Table[
  ResourceFunction["OEISSequence"]["A00000" <> ToString@n], {n, 1, 9}]]
Out[5]=

Resource History

License Information