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 (1) 

Return OEIS sequence A000045 (Fibonacci sequence):

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

Scope (2) 

To get a value of a sequence, index 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 (1) 

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 (1) 

Plot the first nine OEIS sequences:

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

Publisher

Dmitri Volkov

Version History

  • 1.0.0 – 05 July 2019

License Information