OEIS.Sequence
(oeis v0.7.1)
Copy Markdown
Represents a sequence from the On-Line Encyclopedia of Integer Sequences.
Fields
:id- The OEIS A-number (e.g., "A000045").:number- The integer part of the A-number (e.g., 45).:name- The name or description of the sequence.:data- A list of integers representing the sequence data.:comment- A list of comments associated with the sequence.:reference- A list of bibliographic references.:formula- A list of formulas describing the sequence.:example- A list of examples.:link- A list of links (maps with :url and :text keys).:xref- A list of cross-references to other sequences.:keyword- A list of keywords associated with the sequence (e.g., ["core", "nice"]).:offset- A tuple of two integers{subscript, sort_term}wheresubscriptis the index of the first term.:maple- A list of Maple code snippets.:mathematica- A list of Mathematica code snippets.:program- A list of code snippets in other languages.:revision- The revision number of the sequence entry.:references- The total count of bibliographic references.:ext- A list of extensions or corrections.:author- The author(s) of the sequence.:created- The creation timestamp (DateTime).:time- The last modification timestamp (DateTime).
Enumerable
OEIS.Sequence implements the Enumerable protocol, which allows you to iterate
over its sequence :data directly using the Enum module.
iex> {:single, seq} = OEIS.search("A000045")
iex> Enum.take(seq, 5)
[0, 1, 1, 2, 3]