OEIS
App · Research & Academia · 5 actions
Look up integer sequences in the OEIS, the On-Line Encyclopedia of Integer Sequences: nearly 400,000 sequences, each with its definition, formulas, references and code. Hand it the numbers from a calculation and find out what they are, search by subject, read a sequence's entry, pull thousands of its terms, or follow the sequences related to it. Free and public, with nothing to sign up for.
Actions
| Action | What it does |
|---|---|
| Find related sequences | List the sequences whose entries mention a given one, which is how the OEIS records that two sequences have something to do with each other. |
| Get a sequence | Read one sequence's entry: its definition, its first terms, who contributed it and when it last changed. |
| Get more terms | Read terms from a sequence's full table, which runs far past the handful an entry displays: the Fibonacci numbers are listed to the 2000th, the Moebius function to the 100000th. |
| Identify a sequence | Give the OEIS a run of whole numbers and find out what it is. |
| Search sequences | Search the OEIS by words rather than by numbers, and narrow the matches by the tags the OEIS puts on every sequence or by who contributed it. |
Find related sequences
List the sequences whose entries mention a given one, which is how the OEIS records that two sequences have something to do with each other. Order by how often a sequence is referred to elsewhere to surface the important relatives first. The sequence itself is left out of the answer.
Inputs
- Sequence number
sequencetextRequired - The OEIS number of the sequence, such as A000045. The leading A and the zeros are optional, and a link to the sequence works too.
- Order results by
sorttext - How to order the matches. Defaults to relevance.One of:
relevance(Relevance (best match first)),references(Most referred to by other sequences),created(Recently added),modified(Recently updated),number(Sequence number). - Number of results
max_resultsnumber - How many sequences to return, up to 100. Defaults to 10.From 1 to 100.
- Skip this many results
startnumber - Use this to page through a long list of matches: 0 starts at the best match, 10 starts at the 11th. The OEIS serves the first 200 matches of any search to visitors without an account, so narrow the search rather than paging past them.From 0 to 100.
Outputs
has_moretrue/falseidtextresult_countnumberresultsliststart_indexnumberurltext
Example output
{
"has_more": true,
"id": "A000045",
"result_count": 1,
"results": [
{
"added": "1991-04-30T03:00:00-04:00",
"author": "N. J. A. Sloane, 1964",
"cited_by_count": 6157,
"first_index": 0,
"id": "A000032",
"keywords": [
"nonn",
"core",
"nice",
"easy",
"hear"
],
"last_modified": "2026-08-27T10:07:07-04:00",
"name": "Lucas numbers beginning at 2: L(n) = L(n-1) + L(n-2).",
"terms": [
"2",
"1",
"3",
"4",
"7",
"11",
"18",
"29"
],
"url": "https://oeis.org/A000032"
}
],
"start_index": 0,
"url": "https://oeis.org/A000045"
}Get a sequence
Read one sequence's entry: its definition, its first terms, who contributed it and when it last changed. A well-studied sequence also carries hundreds of comments, formulas, citations and programs, which run to hundreds of kilobytes, so those are returned only when asked for.
Inputs
- Sequence number
sequencetextRequired - The OEIS number of the sequence, such as A000045. The leading A and the zeros are optional, and a link to the sequence works too.
- Also include
includelist - The longer parts of the entry to return as well. Leave empty for the definition, the first terms and the contributor on their own.One or more of:
comments,formulas,examples,bibliography(Books and papers),links,crossrefs(Related sequences),maple(Maple code),mathematica(Mathematica code),programs(Code in other languages),history(Corrections and extensions).
Outputs
sequenceobject
Example output
{
"sequence": {
"added": "1991-04-30T03:00:00-04:00",
"author": "N. J. A. Sloane, 1964",
"cited_by_count": 6157,
"first_index": 0,
"formulas": [
"G.f.: x / (1 - x - x^2)."
],
"id": "A000045",
"keywords": [
"nonn",
"core",
"nice",
"easy",
"hear"
],
"last_modified": "2026-08-27T10:07:07-04:00",
"legacy_ids": [
"M0692",
"N0256"
],
"name": "Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.",
"terms": [
"0",
"1",
"1",
"2",
"3",
"5",
"8",
"13",
"21",
"34",
"55",
"89"
],
"url": "https://oeis.org/A000045"
}
}Get more terms
Read terms from a sequence's full table, which runs far past the handful an entry displays: the Fibonacci numbers are listed to the 2000th, the Moebius function to the 100000th. Use it to feed real data into a calculation, a chart or a spreadsheet. Terms come back as text so that the very large ones stay exact.
Inputs
- Sequence number
sequencetextRequired - The OEIS number of the sequence, such as A000045. The leading A and the zeros are optional, and a link to the sequence works too.
- How many terms
countnumber - How many terms to return, up to 1000. Defaults to 100.From 1 to 1000.
- Start at term number
start_indexnumber - Which term to start from, counted the way the sequence itself counts: the Fibonacci numbers start at 0, most lists start at 1. Leave empty to start at the beginning.At least 0.
Outputs
first_indexnumberhas_moretrue/falseidtextlast_indexnumberterm_countnumbertermslisturltext
Example output
{
"first_index": 0,
"has_more": true,
"id": "A000045",
"last_index": 9,
"term_count": 10,
"terms": [
"0",
"1",
"1",
"2",
"3",
"5",
"8",
"13",
"21",
"34"
],
"url": "https://oeis.org/A000045"
}Identify a sequence
Give the OEIS a run of whole numbers and find out what it is. This is what the encyclopedia is for: the counts falling out of a calculation go in, and the sequences that begin that way come back, named and explained. Negative signs count, so a sequence that alternates is never confused with the same numbers made positive. The answer also says plainly whether anything matched, so a workflow can branch on it.
Inputs
- The numbers
termstextRequired - The numbers you have, separated by commas. Six or so is ideal. Leave off the first term or two, since people disagree about where a sequence starts, and leave off any leading zeros and ones.
- Number of results
max_resultsnumber - How many sequences to return, up to 100. Defaults to 10.From 1 to 100.
Outputs
best_matchobjectfoundtrue/falsehas_moretrue/falseresult_countnumberresultslisttermslist
Example output
{
"best_match": {
"added": "1991-04-30T03:00:00-04:00",
"author": "N. J. A. Sloane, 1964",
"cited_by_count": 6157,
"first_index": 0,
"id": "A000045",
"keywords": [
"nonn",
"core",
"nice",
"easy",
"hear"
],
"last_modified": "2026-08-27T10:07:07-04:00",
"name": "Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.",
"terms": [
"0",
"1",
"1",
"2",
"3",
"5",
"8",
"13",
"21",
"34",
"55",
"89"
],
"url": "https://oeis.org/A000045"
},
"found": true,
"has_more": false,
"result_count": 1,
"results": [
{
"added": "1991-04-30T03:00:00-04:00",
"author": "N. J. A. Sloane, 1964",
"cited_by_count": 6157,
"first_index": 0,
"id": "A000045",
"keywords": [
"nonn",
"core",
"nice",
"easy",
"hear"
],
"last_modified": "2026-08-27T10:07:07-04:00",
"name": "Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.",
"terms": [
"0",
"1",
"1",
"2",
"3",
"5",
"8",
"13",
"21",
"34",
"55",
"89"
],
"url": "https://oeis.org/A000045"
}
],
"terms": [
"2",
"3",
"5",
"8",
"13",
"21"
]
}Search sequences
Search the OEIS by words rather than by numbers, and narrow the matches by the tags the OEIS puts on every sequence or by who contributed it. Use it to find the sequences about a subject, to watch what has been added lately, or to pull together a set of sequences to work through.
Inputs
- Search for
querytextRequired - What to look for. A plain phrase searches the whole entry. The OEIS's own search syntax works too, so name: and comment: narrow a search to one part of an entry, a minus sign excludes a term, and a vertical bar between two terms matches either.
- Tagged with
keywordslist - Only return sequences carrying all of these tags. The OEIS puts them on every entry to say what kind of sequence it is and how well it is known. Leave empty for all of them.One or more of:
core(Core: one of the OEIS's most important sequences),nice(Nice: exceptionally nice),easy(Easy: more terms are easy to compute),hard(Hard: the next term is hard to find),more(More: more terms are wanted),nonn(Non-negative: every term shown is zero or above),sign(Signed: contains negative numbers),fini(Finite: the sequence ends),full(Full: every term is given),mult(Multiplicative), and 20 more. - Contributed by
authortext - Only return sequences a given person contributed. A surname is usually enough.
- Order results by
sorttext - How to order the matches. Defaults to relevance.One of:
relevance(Relevance (best match first)),references(Most referred to by other sequences),created(Recently added),modified(Recently updated),number(Sequence number). - Number of results
max_resultsnumber - How many sequences to return, up to 100. Defaults to 10.From 1 to 100.
- Skip this many results
startnumber - Use this to page through a long list of matches: 0 starts at the best match, 10 starts at the 11th. The OEIS serves the first 200 matches of any search to visitors without an account, so narrow the search rather than paging past them.From 0 to 100.
Outputs
has_moretrue/falseresult_countnumberresultsliststart_indexnumber
Example output
{
"has_more": false,
"result_count": 1,
"results": [
{
"added": "1991-04-30T03:00:00-04:00",
"author": "N. J. A. Sloane, 1964",
"cited_by_count": 6157,
"first_index": 0,
"id": "A000045",
"keywords": [
"nonn",
"core",
"nice",
"easy",
"hear"
],
"last_modified": "2026-08-27T10:07:07-04:00",
"name": "Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.",
"terms": [
"0",
"1",
"1",
"2",
"3",
"5",
"8",
"13",
"21",
"34",
"55",
"89"
],
"url": "https://oeis.org/A000045"
}
],
"start_index": 0
}