Get OEIS Sequence
oeis_get_sequenceFetch one OEIS entry by A-number. Returns the name, data-line terms, offset, keywords, author, dates, and the sections: comments, formulas (recurrences and generating functions), examples, programs (Maple, Mathematica, PARI, Python, …), references, links, cross-references, and extensions. When the sections together exceed 24,000 characters of serialized JSON, the core fields come back with a section outline instead; call again with sections to pick what to read. A selection past 100,000 bytes comes back in parts cut between items: pass nextFromItem as fromItem, with the same sections, for the next part.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"aNumber": "<aNumber>"
},
"name": "oeis_get_sequence"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aNumber | Yes | OEIS A-number, e.g. "A000045"; oeis_identify_sequence and oeis_search_sequences return them. Also accepts "a000045", "A45", "45", and an oeis.org sequence URL; all normalize to the zero-padded form. Legacy M/N book numbers (e.g. "M1459") are not A-numbers: find them with oeis_search_sequences. | |
| fromItem | No | Where to resume a cut selection: the previous response's nextFromItem, passed unchanged with the same sections. The selected sections before fromItem.section are left out. Omit to start at the beginning. | |
| sections | No | Sections to return with the core fields, e.g. ["formulas", "programs"]. A selection past the 100,000-byte response budget is cut between items; fromItem continues it. Omit (or pass []) for the full entry, or the core fields plus an outline when the entry is large. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Sequence page on oeis.org; cite it wherever the entry is reused. | |
| kind | No | full: every section, or the selected ones (a selection past the 100,000-byte response budget is cut between items, and nextFromItem continues it). outline: the entry is too large, so sections lists the sections to request by name. | |
| name | No | Sequence name, written by OEIS contributors. | |
| error | No | Present when the call failed. Absent on success. | |
| links | No | Link lines. Present on a full entry or when selected; a cut selection carries only this part's lines. | |
| terms | No | Data-line terms as exact decimal strings, signs kept; the first is a(firstIndex). | |
| author | No | Author line as OEIS records it; absent when the entry has none. | |
| notice | No | Guidance: the entry is withdrawn (dead) or its A-number reserved or recycled; where a cut selection stopped and the call that continues it; or that fromItem lies past the end of its section. | |
| offset | No | Offset "i,p": i is the index n of the first term, p the 1-based position of the first term with |a(n)| > 1. Absent on a reserved or recycled A-number (keyword allocated or recycled). | |
| aNumber | No | A-number, e.g. "A000045". | |
| created | No | When the entry was created, ISO 8601 with offset. | |
| bFileUrl | No | URL of the entry's b-file of extended terms; oeis_get_terms reads it. | |
| comments | No | Comment lines, one element per upstream line, written by OEIS contributors. Present on a full entry or when selected; a cut selection carries only this part's lines. | |
| examples | No | Example lines; whitespace matters for triangles and tables, one element per upstream line, written by OEIS contributors. Present on a full entry or when selected; a cut selection carries only this part's lines. | |
| formulas | No | Formula lines: recurrences, generating functions, closed forms, one element per upstream line, written by OEIS contributors. Present on a full entry or when selected; a cut selection carries only this part's lines. | |
| keywords | No | Keyword flags such as nonn, core, tabl; oeis_list_reference topic keywords decodes them. | |
| modified | No | When the entry was last edited, ISO 8601 with offset. | |
| programs | No | Programs that compute the terms. Present on a full entry or when selected; a cut selection carries only this part's blocks. | |
| revision | No | Revision number of the entry. | |
| sections | No | Outline only: the sections of the entry, largest first. | |
| legacyIds | No | Legacy book numbers, e.g. ["M0692", "N0256"]; absent on entries that have none. | |
| extensions | No | Extension lines: who added terms or corrections, and when, one element per upstream line, written by OEIS contributors. Present on a full entry or when selected; a cut selection carries only this part's lines. | |
| firstIndex | No | The index n of the first term (the first number of offset); absent with offset. | |
| references | No | Reference lines (books and papers), one element per upstream line, written by OEIS contributors. Present on a full entry or when selected; a cut selection carries only this part's lines. | |
| nextFromItem | No | Present when the selection was cut at the 100,000-byte response budget: the first item left out. Pass it unchanged as fromItem, with the same sections, to continue. | |
| outlineNotice | No | Outline only: how to request sections, and how a large selection continues. | |
| referenceCount | No | How many OEIS entries mention this A-number, the entry itself included. | |
| crossReferences | No | Cross-reference lines naming related A-numbers, one element per upstream line, written by OEIS contributors. Present on a full entry or when selected; a cut selection carries only this part's lines. |