oeis-mcp-server

Identify integer sequences by terms, search the OEIS, read formulas, programs, b-files, cross-refs.

Should I use this

Quality & Safety

A
Description quality
100%
Schema completeness
100%
Naming quality
80%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~8,264Tokens (tool definitions)
~15.8 KBTypical response size
Significant attention impact (6.46% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "oeis-mcp-server": {
      "command": "node",
      "args": [
        "@cyanheads/oeis-mcp-server"
      ]
    }
  }
}

Runnable packages

npm@cyanheads/oeis-mcp-server0.1.2streamable-http

Remote endpoints

https://oeis.caseyjhand.com/mcpstreamable-http

What it can do

Tool inventory

Tools (6)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢oeis_identify_sequence(terms, matchSigns, start)

Identify integer sequences that contain a run of consecutive terms, e.g. "1, 2, 5, 14, 42". Returns up to 10 matches per page in OEIS relevance order, each with the index n at which the supplied run begins. For the best hit rate supply about 6 terms and leave off the first one or two, since sources disagree on where a sequence starts. OEIS matches only the first terms of each entry (its data line, at most about 270 characters), not its b-file, so a run from far into a sequence is not found. Takes up to 60 terms, each an integer of at most 200 digits or the wildcard _ for one unknown term.

Input Schema

{
  "type": "object",
  "properties": {
    "terms": {
      "description": "Up to 60 consecutive terms separated by commas or spaces, e.g. \"1, 2, 5, 14, 42\" (a bracketed list or a trailing ... is accepted). Each term is an integer of at most 200 digits, or _ for a single unknown term.",
      "type": "string"
    },
    "matchSigns": {
      "description": "false (default) matches ignoring signs, so a sign-convention difference does not hide the sequence; true requires the signs to match.",
      "default": false,
      "type": "boolean"
    },
    "start": {
      "description": "Result offset: 0, 10, … 100 (OEIS shows at most 110 results per query). Pass nextStart from the previous page.",
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "multipleOf": 10
    }
  },
  "required": [
    "terms"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "aNumber": {
            "type": "string",
            "description": "A-number, e.g. \"A000108\"; pass it to oeis_get_sequence for the full entry."
          },
          "name": {
            "type": "string",
            "description": "Sequence name, written by OEIS contributors."
          },
          "terms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Data-line terms as exact decimal strings, signs kept."
          },
          "offset": {
            "description": "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).",
            "type": "string"
          },
          "firstIndex": {
            "description": "The index n of the first term (the first number of offset); absent with offset.",
            "type": "number"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keyword flags such as nonn, core, tabl; oeis_list_reference topic keywords decodes them."
          },
          "author": {
            "description": "Author line as OEIS records it, written by OEIS contributors; absent when the entry has none, as on a reserved or recycled A-number.",
            "type": "string"
          },
          "legacyIds": {
            "description": "Legacy book numbers, e.g. [\"M0692\", \"N0256\"]; absent on entries that have none, and when OEIS sends no readable edit line.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modified": {
            "description": "When the entry was last edited, ISO 8601 with offset, e.g. \"2026-09-23T16:08:09-04:00\"; absent when OEIS sends no readable edit time.",
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Sequence page on oeis.org; cite it wherever the entry is reused."
          },
          "matchStartIndex": {
            "description": "The index n where the supplied run begins in this entry's data line; absent when the run is not in the data line (OEIS matched it another way).",
            "type": "number"
          }
        },
        "required": [
          "aNumber",
          "name",
          "terms",
          "keywords",
          "url"
        ],
        "additionalProperties": false,
        "description": "One candidate sequence."
      },
      "description": "Candidate sequences on this page, in OEIS relevance order."
    },
    "start": {
      "type": "number",
      "description": "The result offset of this page as OEIS served it; below the requested start when that start was past the last result (OEIS then serves the last page)."
    },
    "nextStart": {
      "description": "Pass as start for the next page; absent on the last reachable page.",
      "type": "number"
    },
    "truncated": {
      "type": "boolean",
      "description": "True when more rows exist than this page shows."
    },
    "shown": {
      "type": "number",
      "description": "Rows on this page."
    },
    "cap": {
      "type": "number",
      "description": "Page size: 10, fixed by OEIS."
    },
    "totalCount": {
      "description": "Total rows: the match count OEIS reported, or for outgoing cross-references the number of distinct A-numbers the entry names.",
      "type": "number"
    },
    "effectiveQuery": {
      "description": "The query as OEIS parsed it (lowercased upstream), e.g. seq:1,2,5,14,42.",
      "type": "string"
    },
    "notice": {
      "description": "Guidance: why nothing matched, how to narrow the query, or how to reach the next page.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `pacer_shed`: The oeis.org request queue would exceed its wait budget. `upstream_rate_limited`: oeis.org answered HTTP 429 Too Many Requests and retries within the call did not clear it. Other values are possible when a failure originates below the handler.",
              "examples": [
                "pacer_shed",
                "upstream_rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "results",
        "start",
        "truncated",
        "shown",
        "cap"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢oeis_search_sequences(query, sort, start)

Search the OEIS using its query syntax: plain words, "quoted phrases", comma-separated terms, prefixes (keyword:, author:, name:, comment:, formula:, program:, xref:, id:), | for OR, and a leading - to exclude. Returns up to 10 summaries per page. For identifying a sequence from its terms, oeis_identify_sequence is the direct route.

Input Schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "OEIS query, sent as written. Examples: keyword:core fibonacci; author:Sloane; \"Catalan numbers\" (a quoted phrase); 1,2,5,14,42. oeis_list_reference topic search_syntax lists the prefixes and operators."
    },
    "sort": {
      "description": "Result order: relevance (default), number (ascending A-number), created (newest entry first), or modified (most recently edited first).",
      "default": "relevance",
      "type": "string",
      "enum": [
        "relevance",
        "number",
        "created",
        "modified"
      ]
    },
    "start": {
      "description": "Result offset: 0, 10, … 100 (OEIS shows at most 110 results per query). Pass nextStart from the previous page.",
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "multipleOf": 10
    }
  },
  "required": [
    "query"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "aNumber": {
            "type": "string",
            "description": "A-number, e.g. \"A000108\"; pass it to oeis_get_sequence for the full entry."
          },
          "name": {
            "type": "string",
            "description": "Sequence name, written by OEIS contributors."
          },
          "terms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Data-line terms as exact decimal strings, signs kept."
          },
          "offset": {
            "description": "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).",
            "type": "string"
          },
          "firstIndex": {
            "description": "The index n of the first term (the first number of offset); absent with offset.",
            "type": "number"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keyword flags such as nonn, core, tabl; oeis_list_reference topic keywords decodes them."
          },
          "author": {
            "description": "Author line as OEIS records it, written by OEIS contributors; absent when the entry has none, as on a reserved or recycled A-number.",
            "type": "string"
          },
          "legacyIds": {
            "description": "Legacy book numbers, e.g. [\"M0692\", \"N0256\"]; absent on entries that have none, and when OEIS sends no readable edit line.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modified": {
            "description": "When the entry was last edited, ISO 8601 with offset, e.g. \"2026-09-23T16:08:09-04:00\"; absent when OEIS sends no readable edit time.",
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Sequence page on oeis.org; cite it wherever the entry is reused."
          }
        },
        "required": [
          "aNumber",
          "name",
          "terms",
          "keywords",
          "url"
        ],
        "additionalProperties": false,
        "description": "One matching sequence."
      },
      "description": "Matching sequences on this page, in the applied order."
    },
    "start": {
      "type": "number",
      "description": "The result offset of this page as OEIS served it; below the requested start when that start was past the last result (OEIS then serves the last page)."
    },
    "nextStart": {
      "description": "Pass as start for the next page; absent on the last reachable page.",
      "type": "number"
    },
    "sort": {
      "type": "string",
      "enum": [
        "relevance",
        "number",
        "created",
        "modified"
      ],
      "description": "The result order applied."
    },
    "truncated": {
      "type": "boolean",
      "description": "True when more rows exist than this page shows."
    },
    "shown": {
      "type": "number",
      "description": "Rows on this page."
    },
    "cap": {
      "type": "number",
      "description": "Page size: 10, fixed by OEIS."
    },
    "totalCount": {
      "description": "Total rows: the match count OEIS reported, or for outgoing cross-references the number of distinct A-numbers the entry names.",
      "type": "number"
    },
    "effectiveQuery": {
      "description": "The query as OEIS parsed it (lowercased upstream), e.g. seq:1,2,5,14,42.",
      "type": "string"
    },
    "notice": {
      "description": "Guidance: why nothing matched, how to narrow the query, or how to reach the next page.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `pacer_shed`: The oeis.org request queue would exceed its wait budget. `upstream_rate_limited`: oeis.org answered HTTP 429 Too Many Requests and retries within the call did not clear it. Other values are possible when a failure originates below the handler.",
              "examples": [
                "pacer_shed",
                "upstream_rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "results",
        "start",
        "sort",
        "truncated",
        "shown",
        "cap"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢oeis_get_sequence(aNumber, sections, fromItem)

Fetch 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.

Input Schema

{
  "type": "object",
  "properties": {
    "aNumber": {
      "description": "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.",
      "type": "string"
    },
    "sections": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "comments",
          "formulas",
          "examples",
          "programs",
          "references",
          "links",
          "crossReferences",
          "extensions"
        ]
      }
    },
    "fromItem": {
      "description": "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.",
      "type": "object",
      "properties": {
        "section": {
          "type": "string",
          "enum": [
            "comments",
            "formulas",
            "examples",
            "programs",
            "references",
            "links",
            "crossReferences",
            "extensions"
          ],
          "description": "Section name."
        },
        "index": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "0-based position of the item within its section."
        }
      },
      "required": [
        "section",
        "index"
      ]
    }
  },
  "required": [
    "aNumber"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "full",
        "outline"
      ],
      "description": "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."
    },
    "aNumber": {
      "type": "string",
      "description": "A-number, e.g. \"A000045\"."
    },
    "name": {
      "type": "string",
      "description": "Sequence name, written by OEIS contributors."
    },
    "terms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Data-line terms as exact decimal strings, signs kept; the first is a(firstIndex)."
    },
    "offset": {
      "description": "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).",
      "type": "string"
    },
    "firstIndex": {
      "description": "The index n of the first term (the first number of offset); absent with offset.",
      "type": "number"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Keyword flags such as nonn, core, tabl; oeis_list_reference topic keywords decodes them."
    },
    "author": {
      "description": "Author line as OEIS records it; absent when the entry has none.",
      "type": "string"
    },
    "legacyIds": {
      "description": "Legacy book numbers, e.g. [\"M0692\", \"N0256\"]; absent on entries that have none.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "referenceCount": {
      "type": "number",
      "description": "How many OEIS entries mention this A-number, the entry itself included."
    },
    "revision": {
      "type": "number",
      "description": "Revision number of the entry."
    },
    "created": {
      "description": "When the entry was created, ISO 8601 with offset.",
      "type": "string"
    },
    "modified": {
      "description": "When the entry was last edited, ISO 8601 with offset.",
      "type": "string"
    },
    "url": {
      "type": "string",
      "description": "Sequence page on oeis.org; cite it wherever the entry is reused."
    },
    "bFileUrl": {
      "description": "URL of the entry's b-file of extended terms; oeis_get_terms reads it.",
      "type": "string"
    },
    "comments": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "formulas": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "examples": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "programs": {
      "description": "Programs that compute the terms. Present on a full entry or when selected; a cut selection carries only this part's blocks.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "language": {
            "description": "Language, e.g. Maple, Mathematica, PARI, Python; absent when untagged.",
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Program text, one upstream line per line."
          }
        },
        "required": [
          "code"
        ],
        "additionalProperties": false,
        "description": "One program block."
      }
    },
    "references": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "links": {
      "description": "Link lines. Present on a full entry or when selected; a cut selection carries only this part's lines.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The link line with HTML removed."
          },
          "urls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Absolute URL of every link on the line."
          }
        },
        "required": [
          "text",
          "urls"
        ],
        "additionalProperties": false,
        "description": "One link line."
      }
    },
    "crossReferences": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "extensions": {
      "description": "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "nextFromItem": {
      "description": "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.",
      "type": "object",
      "properties": {
        "section": {
          "type": "string",
          "enum": [
            "comments",
            "formulas",
            "examples",
            "programs",
            "references",
            "links",
            "crossReferences",
            "extensions"
          ],
          "description": "Section name."
        },
        "index": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "0-based position of the item within its section."
        }
      },
      "required": [
        "section",
        "index"
      ],
      "additionalProperties": false
    },
    "sections": {
      "description": "Outline only: the sections of the entry, largest first.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Section name to pass in sections."
          },
          "bytes": {
            "type": "number",
            "description": "Size of the section as serialized JSON, counted in characters (UTF-16 code units, equal to bytes for ASCII text): the unit of the 24,000 outline budget."
          }
        },
        "required": [
          "name",
          "bytes"
        ],
        "additionalProperties": false,
        "description": "One section of the entry and its size."
      }
    },
    "outlineNotice": {
      "description": "Outline only: how to request sections, and how a large selection continues.",
      "type": "string"
    },
    "notice": {
      "description": "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.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `sequence_not_found`: No OEIS entry exists for the requested A-number. `from_item_not_selected`: fromItem is given without sections, or names a section that sections does not select. `pacer_shed`: The oeis.org request queue would exceed its wait budget. `upstream_rate_limited`: oeis.org answered HTTP 429 Too Many Requests and retries within the call did not clear it. Other values are possible when a failure originates below the handler.",
              "examples": [
                "sequence_not_found",
                "from_item_not_selected",
                "pacer_shed",
                "upstream_rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "kind",
        "aNumber",
        "name",
        "terms",
        "keywords",
        "referenceCount",
        "revision",
        "url"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢oeis_get_terms(aNumber, fromIndex, limit)

List terms a(n) of a sequence with their indices n. Reads the entry's b-file when it has one — often thousands of terms beyond the data line — and otherwise the data line itself. Values are exact decimal strings of any size. A slice stops at limit terms, at about 100,000 bytes, or at the end of one 1 MiB part of a larger b-file, whichever comes first; nextFromIndex continues it.

Input Schema

{
  "type": "object",
  "properties": {
    "aNumber": {
      "description": "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.",
      "type": "string"
    },
    "fromIndex": {
      "description": "First index n to return; defaults to the first available index. Pass nextFromIndex from the previous call to continue.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Maximum number of terms to return, 1–1000 (default 100). A slice stops sooner at about 100,000 bytes of large terms or at the end of one 1 MiB part of a larger b-file; continue with nextFromIndex.",
      "default": 100,
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  },
  "required": [
    "aNumber"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "aNumber": {
      "type": "string",
      "description": "A-number, e.g. \"A000045\"."
    },
    "source": {
      "type": "string",
      "enum": [
        "bfile",
        "data"
      ],
      "description": "bfile: read from the entry's b-file of extended terms. data: the entry has no b-file, so these are its data-line terms."
    },
    "terms": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "n": {
            "type": "number",
            "description": "The index n."
          },
          "value": {
            "type": "string",
            "description": "a(n) as an exact decimal string, sign kept."
          }
        },
        "required": [
          "n",
          "value"
        ],
        "additionalProperties": false,
        "description": "One term."
      },
      "description": "Terms in index order, from the first index at or after fromIndex (or the first available index)."
    },
    "firstAvailableIndex": {
      "description": "Lowest index n read for this entry; absent when no terms were read.",
      "type": "number"
    },
    "lastAvailableIndex": {
      "description": "Highest index n read so far for this entry; when bFileCut is true the b-file goes on past it. Absent when no terms were read.",
      "type": "number"
    },
    "nextFromIndex": {
      "description": "Pass as fromIndex for the next slice. Absent when no slice follows this one: the terms ended, or the notice says how to reach the rest.",
      "type": "number"
    },
    "bFileUrl": {
      "description": "URL of the b-file the terms came from; absent when source is data.",
      "type": "string"
    },
    "bFileSizeInBytes": {
      "description": "Full size of the b-file as OEIS reported it; absent when not reported.",
      "type": "number"
    },
    "bFileCut": {
      "type": "boolean",
      "description": "True while the b-file goes on past lastAvailableIndex. Its later terms are at bFileUrl; nextFromIndex or a larger fromIndex reaches them unless the notice says only the first 1 MiB was read."
    },
    "url": {
      "type": "string",
      "description": "Sequence page on oeis.org; cite it wherever the terms are reused."
    },
    "truncated": {
      "type": "boolean",
      "description": "True when nextFromIndex is set."
    },
    "shown": {
      "type": "number",
      "description": "Terms in this slice."
    },
    "cap": {
      "type": "number",
      "description": "The limit that was applied."
    },
    "notice": {
      "description": "Guidance: where the next slice starts and whether the byte budget ended this one, why no terms came back (past the last index, or not yet reached in a large b-file), that a b-file line too long to read was skipped, that only the first 1 MiB of the b-file could be read, or that the terms are data-line only.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `sequence_not_found`: No OEIS entry exists for the requested A-number. `pacer_shed`: The oeis.org request queue would exceed its wait budget. `upstream_rate_limited`: oeis.org answered HTTP 429 Too Many Requests on the b-file or the record and retries within the call did not clear it. Other values are possible when a failure originates below the handler.",
              "examples": [
                "sequence_not_found",
                "pacer_shed",
                "upstream_rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "aNumber",
        "source",
        "terms",
        "bFileCut",
        "url",
        "truncated",
        "shown",
        "cap"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢oeis_get_cross_refs(aNumber, direction, start)

List sequences related to an OEIS entry. direction outgoing returns the A-numbers named in the entry's cross-reference (Cf.) lines, with any parenthetical note beside each; direction incoming returns entries that mention this A-number anywhere. Each row carries the related sequence's name and first terms. 10 rows per page.

Input Schema

{
  "type": "object",
  "properties": {
    "aNumber": {
      "description": "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.",
      "type": "string"
    },
    "direction": {
      "description": "outgoing (default): the A-numbers this entry cross-references. incoming: the entries that mention this A-number.",
      "default": "outgoing",
      "type": "string",
      "enum": [
        "outgoing",
        "incoming"
      ]
    },
    "start": {
      "description": "Row offset: 0, 10, … 100 (at most 110 rows are reachable per entry and direction). Pass nextStart from the previous page.",
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "multipleOf": 10
    }
  },
  "required": [
    "aNumber"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "aNumber": {
      "type": "string",
      "description": "The entry whose relations are listed, e.g. \"A000045\"."
    },
    "direction": {
      "type": "string",
      "enum": [
        "outgoing",
        "incoming"
      ],
      "description": "The direction listed."
    },
    "related": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "aNumber": {
            "type": "string",
            "description": "Related A-number; pass it to oeis_get_sequence for the full entry."
          },
          "resolved": {
            "type": "boolean",
            "description": "True when name and terms were fetched. False when OEIS returned no record for this A-number or the lookup could not be made (see notice); name, terms, offset, firstIndex, keywords, author, legacyIds, and modified are then absent."
          },
          "name": {
            "description": "Sequence name, written by OEIS contributors; absent when not resolved.",
            "type": "string"
          },
          "terms": {
            "description": "Data-line terms as exact decimal strings, signs kept; absent when not resolved.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "offset": {
            "description": "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 when not resolved, and on a reserved or recycled A-number (keyword allocated or recycled).",
            "type": "string"
          },
          "firstIndex": {
            "description": "The index n of the first term; absent with offset.",
            "type": "number"
          },
          "keywords": {
            "description": "Keyword flags such as nonn, core, tabl (oeis_list_reference topic keywords decodes them); absent when not resolved.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "description": "Author line as OEIS records it, written by OEIS contributors; absent when not resolved, and when the entry has none, as on a reserved or recycled A-number.",
            "type": "string"
          },
          "legacyIds": {
            "description": "Legacy book numbers, e.g. [\"M0692\", \"N0256\"]; absent when not resolved, on entries that have none, and when OEIS sends no readable edit line.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modified": {
            "description": "When the entry was last edited, ISO 8601 with offset, e.g. \"2026-09-23T16:08:09-04:00\"; absent when not resolved, and when OEIS sends no readable edit time.",
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Sequence page on oeis.org; cite it wherever the entry is reused."
          },
          "note": {
            "description": "Outgoing only: the parenthetical written beside the A-number in a cross-reference line, e.g. \"phi\"; written by OEIS contributors.",
            "type": "string"
          },
          "lineIndex": {
            "description": "Outgoing only: 0-based index into lines of the first cross-reference line naming this A-number.",
            "type": "number"
          }
        },
        "required": [
          "aNumber",
          "resolved",
          "url"
        ],
        "additionalProperties": false,
        "description": "One related sequence."
      },
      "description": "Related sequences on this page: outgoing in order of first mention, incoming in OEIS relevance order."
    },
    "lines": {
      "description": "Outgoing only: the entry's cross-reference lines verbatim, written by OEIS contributors; lineIndex points into this list.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "start": {
      "type": "number",
      "description": "The row offset of this page. For incoming, as OEIS served it: below the requested start when that start was past the last entry (OEIS then serves the last page)."
    },
    "nextStart": {
      "description": "Pass as start for the next page; absent on the last reachable page.",
      "type": "number"
    },
    "truncated": {
      "type": "boolean",
      "description": "True when more rows exist than this page shows."
    },
    "shown": {
      "type": "number",
      "description": "Rows on this page."
    },
    "cap": {
      "type": "number",
      "description": "Page size: 10, fixed by OEIS."
    },
    "totalCount": {
      "description": "Total rows: the match count OEIS reported, or for outgoing cross-references the number of distinct A-numbers the entry names.",
      "type": "number"
    },
    "effectiveQuery": {
      "description": "The query as OEIS parsed it (lowercased upstream), e.g. seq:1,2,5,14,42.",
      "type": "string"
    },
    "notice": {
      "description": "Guidance: why nothing matched, how to narrow the query, or how to reach the next page.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `sequence_not_found`: No OEIS entry exists for the requested A-number. Raised for direction outgoing only; direction incoming reports that no entry mentions it. `pacer_shed`: The oeis.org request queue would exceed its wait budget on the record fetch or the incoming search. `upstream_rate_limited`: oeis.org answered HTTP 429 Too Many Requests on the record fetch or the incoming search, and retries within the call did not clear it. Other values are possible when a failure originates below the handler.",
              "examples": [
                "sequence_not_found",
                "pacer_shed",
                "upstream_rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "aNumber",
        "direction",
        "related",
        "start",
        "truncated",
        "shown",
        "cap"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢oeis_list_reference(topic)

Look up OEIS vocabulary used by the other tools: keyword flags (nonn, core, tabl, cons, …), search syntax (prefixes, operators, wildcards, sort orders, paging window), and identifier conventions (A-numbers, legacy M/N numbers, offsets, b-files).

Input Schema

{
  "type": "object",
  "properties": {
    "topic": {
      "type": "string",
      "enum": [
        "keywords",
        "search_syntax",
        "identifiers"
      ],
      "description": "keywords: keyword flags such as nonn, core, tabl. search_syntax: prefixes, operators, wildcards, sort orders, and paging. identifiers: A-numbers, legacy M/N numbers, offsets, and b-files."
    }
  },
  "required": [
    "topic"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "topic": {
      "type": "string",
      "description": "The topic listed."
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The keyword, prefix, operator, or identifier."
          },
          "description": {
            "type": "string",
            "description": "What it means and how to use it."
          }
        },
        "required": [
          "name",
          "description"
        ],
        "additionalProperties": false,
        "description": "One vocabulary entry."
      },
      "description": "Vocabulary entries for the topic."
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Usage notes that apply across the topic."
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode."
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "topic",
        "entries",
        "notes"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded6 tools