# On-Line Encyclopedia of Integer Sequences

# On-Line Encyclopedia of Integer Sequences

Created by | Neil Sloane |
---|---|

Website | oeis.org ^{[39]} |

Alexa rank | 45,356 (August 2019)^{[1]} |

Commercial | No^{[2]} |

Registration | Optional^{[3]} |

Launched | 1996 (1996) |

The **On-Line Encyclopedia of Integer Sequences** (**OEIS**), also cited simply as **Sloane's**, is an online database of integer sequences. It was created and maintained by Neil Sloane while a researcher at AT&T Labs. Foreseeing his retirement from AT&T Labs in 2012 and the need for an independent foundation, Sloane agreed to transfer the intellectual property and hosting of the OEIS to the **OEIS Foundation** in October 2009.^{[4]} Sloane is president of the OEIS Foundation.

OEIS records information on integer sequences of interest to both professional and amateur mathematicians, and is widely cited. As of June 2019 it contains over 320,000 sequences, making it the largest database of its kind.

Each entry contains the leading terms of the sequence, keywords, mathematical motivations, literature links, and more, including the option to generate a graph or play a musical representation of the sequence. The database is searchable by keyword and by subsequence.

Created by | Neil Sloane |
---|---|

Website | oeis.org ^{[39]} |

Alexa rank | 45,356 (August 2019)^{[1]} |

Commercial | No^{[2]} |

Registration | Optional^{[3]} |

Launched | 1996 (1996) |

History

Second edition of the book

Neil Sloane started collecting integer sequences as a graduate student in 1965 to support his work in combinatorics.^{[5]} The database was at first stored on punched cards. He published selections from the database in book form twice:

(1973, ISBN 0-12-648550-X), containing 2,372 sequences in lexicographic order and assigned numbers from 1 to 2372.**A Handbook of Integer Sequences**with Simon Plouffe (1995, ISBN 0-12-558630-2), containing 5,488 sequences and assigned M-numbers from M0000 to M5487. The Encyclopedia includes the references to the corresponding sequences (which may differ in their few initial terms) in**The Encyclopedia of Integer Sequences***A Handbook of Integer Sequences*as N-numbers from N0001 to N2372 (instead of 1 to 2372.) The Encyclopedia includes the A-numbers that are used in the OEIS, whereas the Handbook did not.

These books were well received and, especially after the second publication, mathematicians supplied Sloane with a steady flow of new sequences. The collection became unmanageable in book form, and when the database had reached 16,000 entries Sloane decided to go online—first as an e-mail service (August 1994), and soon after as a web site (1996). As a spin-off from the database work, Sloane founded the *Journal of Integer Sequences* in 1998.^{[6]}
The database continues to grow at a rate of some 10,000 entries a year.
Sloane has personally managed 'his' sequences for almost 40 years, but starting in 2002, a board of associate editors and volunteers has helped maintain the database.^{[7]}
In 2004, Sloane celebrated the addition of the 100,000th sequence to the database, A100000, which counts the marks on the Ishango bone. In 2006, the user interface was overhauled and more advanced search capabilities were added. In 2010 an OEIS wiki ^{[40]} at OEIS.org ^{[41]} was created to simplify the collaboration of the OEIS editors and contributors.^{[8]} The 200,000th sequence, A200000, was added to the database in November 2011; it was initially entered as A200715, and moved to A200000 after a week of discussion on the SeqFan mailing list,^{[9]}^{[10]} following a proposal by OEIS Editor-in-Chief Charles Greathouse to choose a special sequence for A200000.^{[11]}

Non-integers

`Besides integer sequences, the OEIS also catalogs sequences offractions, the digits oftranscendental numbers,complex numbersand so on by transforming them into integer sequences. Sequences of rationals are represented by two sequences (named with the keyword 'frac'): the sequence of numerators and the sequence of denominators. For example, the fifth-orderFarey sequence,, is catalogued as the numerator sequence 1, 1, 1, 2, 1, 3, 2, 3, 4 (A006842) and the denominator sequence 5, 4, 3, 5, 2, 5, 3, 4, 5 (A006843). Important irrational numbers such as π = 3.1415926535897... are catalogued under representative integer sequences such asdecimalexpansions (here 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, ... (A000796)),binaryexpansions (here 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, ... (A004601)), orcontinued fractionexpansions (here 3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, ... (A001203)).`

Conventions

The OEIS was limited to plain ASCII text until 2011, and it still uses a linear form of conventional mathematical notation (such as *f*(*n*) for functions, *n* for running variables, etc.). Greek letters are usually represented by their full names, *e.g.*, mu for μ, phi for φ.
Every sequence is identified by the letter A followed by six digits, almost always referred to with leading zeros, *e.g.*, A000315 rather than A315.
Individual terms of sequences are separated by commas. Digit groups are not separated by commas, periods, or spaces.
In comments, formulas, etc., a(n) represents the *n*th term of the sequence.

Special meaning of zero

Zero is often used to represent non-existent sequence elements. For example, A104157 enumerates the "smallest prime of *n*² consecutive primes to form an *n*×*n* magic square of least magic constant, or 0 if no such magic square exists." The value of *a*(1) (a 1×1 magic square) is 2; *a*(3) is 1480028129. But there is no such 2×2 magic square, so *a*(2) is 0.
This special usage has a solid mathematical basis in certain counting functions. For example, the totient valence function *N*φ(*m*) (A014197) counts the solutions of φ(*x*) = *m*. There are 4 solutions for 4, but no solutions for 14, hence *a*(14) of A014197 is 0—there are no solutions.
Occasionally −1 is used for this purpose instead, as in A094076.

Lexicographical ordering

The OEIS maintains the lexicographical order of the sequences, so each sequence has a predecessor and a successor (its "context").^{[12]} OEIS normalizes the sequences for lexicographical ordering, (usually) ignoring all initial zeros and ones, and also the sign of each element. Sequences of weight distribution codes often omit periodically recurring zeros.

`For example, consider: theprime numbers, thepalindromic primes, theFibonacci sequence, thelazy caterer's sequence, and the coefficients in the series expansion of. In OEIS lexicographic order, they are:`

Sequence #1: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, ... A000040

Sequence #2: 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, ... A002385

Sequence #3: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, ... A000045

Sequence #4: 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, ... A000124

Sequence #5: 1, −3, −8, −3, −24, 24, −48, −3, −8, 72, −120, 24, −168, 144, ... A046970

whereas unnormalized lexicographic ordering would order these sequences thus: #3, #5, #4, #1, #2.

Self-referential sequences

Very early in the history of the OEIS, sequences defined in terms of the numbering of sequences in the OEIS itself were proposed. "I resisted adding these sequences for a long time, partly out of a desire to maintain the dignity of the database, and partly because A22 was only known to 11 terms!", Sloane reminisced.^{[13]}
One of the earliest self-referential sequences Sloane accepted into the OEIS was A031135 (later A091967) "*a*(*n*) = *n*-th term of sequence A*n* or -1 if A*n* has fewer than n terms". This sequence spurred progress on finding more terms of A000022.
A100544 lists the first term given in sequence A*n*, but it needs to be updated from time to time because of changing opinions on offsets. Listing instead term *a*(1) of sequence A*n* might seem a good alternative if it weren't for the fact that some sequences have offsets of 2 and greater.
This line of thought leads to the question "Does sequence A*n* contain the number *n* ?" and the sequences A053873, "Numbers *n* such that OEIS sequence A*n* contains *n*", and A053169, "*n* is in this sequence if and only if *n* is not in sequence A*n*". Thus, the composite number 2808 is in A053873 because A002808 is the sequence of composite numbers, while the non-prime 40 is in A053169 because it's not in A000040, the prime numbers. Each *n* is a member of exactly one of these two sequences, and in principle it can be determined *which* sequence each *n* belongs to, with two exceptions (related to the two sequences themselves):

It cannot be determined whether 53873 is a member of A053873 or not. If it is in the sequence then by definition it should be; if it is not in the sequence then (again, by definition) it should not be. Nevertheless, either decision would be consistent, and would also resolve the question of whether 53873 is in A053169.

It can be proved that 53169 both is and is not a member of A053169. If it is in the sequence then by definition it should not be; if it is not in the sequence then (again, by definition) it should be. This is a form of Russell's paradox. Hence it is also not possible to answer if 53169 is in A053873.

An abridged example of a typical OEIS entry

This entry, A046970, was chosen because it contains every field an OEIS entry can have.^{[14]}

Entry fields

- ID numberEvery sequence in the OEIS has aserial number, a six-digit positive integer, prefixed by A (and zero-padded on the left prior to November 2004). The letter "A" stands for "absolute". Numbers are either assigned by the editor(s) or by an A number dispenser, which is handy for when contributors wish to send in multiple related sequences at once and be able to create cross-references. An A number from the dispenser expires a month from issue if not used. But as the following table of arbitrarily selected sequences show, the rough correspondence holds.

A059097 | Numbers n such that the binomial coefficient C(2n, n) is not divisible by the square of an odd prime. | Jan 1, 2001 |
---|---|---|

A060001 | Fibonacci(n)!. | Mar 14, 2001 |

A066288 | Number of 3-dimensional polyominoes (or polycubes) with n cells and symmetry group of order exactly 24. | Jan 1, 2002 |

A075000 | Smallest number such that n·a(n) is a concatenation of n consecutive integers ... | Aug 31, 2002 |

A078470 | Continued fraction for ζ(3/2) | Jan 1, 2003 |

A080000 | Number of permutations satisfying −k ≤ p(i) − i ≤ r and p(i) − i | Feb 10, 2003 |

A090000 | Length of longest contiguous block of 1s in binary expansion of nth prime. | Nov 20, 2003 |

A091345 | Exponential convolution of A069321(n) with itself, where we set A069321(0) = 0. | Jan 1, 2004 |

A100000 | Marks from the 22000-year-old Ishango bone from the Congo. | Nov 7, 2004 |

A102231 | Column 1 of triangle A102230, and equals the convolution of A032349 with A032349 shift right. | Jan 1, 2005 |

A110030 | Number of consecutive integers starting with n needed to sum to a Niven number. | Jul 8, 2005 |

A112886 | Triangle-free positive integers. | Jan 12, 2006 |

A120007 | Möbius transform of sum of prime factors of n with multiplicity. | Jun 2, 2006 |

- Even for sequences in the book predecessors to the OEIS, the ID numbers are not the same. The 1973
- references to applicable articles in journals
- links to the index
- links to text files which hold the sequence terms (in a two column format) over a wider range of indices than held by the main database lines
- links to images in the local database directories which often provide combinatorial background related to graph theory
- others related to computer codes, more extensive tabulations in specific research areas provided by individuals or research groups

*Handbook of Integer Sequences*contained about 2400 sequences, which were numbered by lexicographic order (the letter N plus four digits, zero-padded where necessary), and the 1995

*Encyclopedia of Integer Sequences*contained 5487 sequences, also numbered by lexicographic order (the letter M plus 4 digits, zero-padded where necessary). These old M and N numbers, as applicable, are contained in the ID number field in parentheses after the modern A number.Sequence dataThe sequence field lists the numbers themselves, or at least about four lines' worth. The sequence field makes no distinction between sequences that are finite but still too long to display and sequences that are infinite. To help make that determination, you need to look at the keywords field for "fini", "full", or "more". To determine to which

*n*the values given correspond, see the offset field, which gives the

*n*for the first term given.NameThe name field usually contains the most common name for the sequence, and sometimes also the formula. For example, 1, 8, 27, 64, 125, 216, 343, 512, (A000578) is named "The cubes: a(n) = n^3.".CommentsThe comments field is for information about the sequence that does not quite fit in any of the other fields. The comments field often points out interesting relationships between different sequences and less obvious applications for a sequence. For example, Lekraj Beedassy in a comment to A000578 notes that the cube numbers also count the "total number of triangles resulting from criss-crossingcevianswithin a triangle so that two of its sides are each n-partitioned," while Neil Sloane points out the unexpected relationship between centered hexagonal numbers (A003215) and second Bessel polynomials (A001498) in a comment to A003215.ReferencesReferences to printed documents (books, papers, ...).LinksLinks, i.e.URLs, to online resources. These may be:

- FormulaFormulae, recurrences, generating functions, etc. for the sequence.ExampleSome examples of sequence member values.MapleMaplecode.MathematicaWolfram Languagecode.ProgramOriginallyMapleandMathematicawere the preferred programs for calculating sequences in the OEIS, and they both have their own field labels. As of 2016, Mathematica was the most popular choice with 100,000 Mathematica programs followed by 50,000PARI/GPprograms, 35,000 Maple programs, and 45,000 in other languages.As for any other part of the record, if there is no name given, the contribution (here: program) was written by the original submitter of the sequence.See alsoSequence cross-references originated by the original submitter are usually denoted by "Cf."Except for new sequences, the "see also" field also includes information on the lexicographic order of the sequence (its "context") and provides links to sequences with close A numbers (A046967, A046968, A046969, A046971, A046972, A046973, in our example). The following table shows the context of our example sequence, A046970:

A016623 | 3, 8, 3, 9, 4, 5, 2, 3, 1, 2, ... | Decimal expansion of ln(93/2). |
---|---|---|

A046543 | 1, 1, 1, 3, 8, 3, 10, 1, 110, 3, 406, 3 | First numerator and then denominator of the central elements of the 1/3-Pascal triangle (by row). |

A035292 | 1, 3, 8, 3, 12, 24, 16, 3, 41, 36, 24, ... | Number of similar sublattices of Z^{4}of index n^{2}. |

A046970 | 1, −3, −8, −3, −24, 24, −48, −3, −8, 72, ... | Generated from Riemann zeta function... |

A058936 | 0, 1, 3, 8, 3, 30, 20, 144, 90, 40, 840, 504, 420, 5760, 3360, 2688, 1260 | Decomposition of Stirling's S(n, 2) based onassociated numeric partitions. |

A002017 | 1, 1, 1, 0, −3, −8, −3, 56, 217, 64, −2951, −12672, ... | Expansion of exp(sin x). |

A086179 | 3, 8, 4, 1, 4, 9, 9, 0, 0, 7, 5, 4, 3, 5, 0, 7, 8 | Decimal expansion of upper bound for the r-values supporting stable period-3 orbits in the logistic equation. |

- KeywordThe OEIS has its own standard set of mostly four-letter keywords that characterize each sequence:
**base**The results of the calculation depend on a specificpositional base. For example, 2, 3, 5, 7, 11, 101, 131, 151, 181 ...A002385are prime numbers regardless of base, but they arepalindromicspecifically in base 10. Most of them are not palindromic in binary. Some sequences rate this keyword depending on how they are defined. For example, theMersenne primes3, 7, 31, 127, 8191, 131071, ...A000668does not rate "base" if defined as "primes of the form 2^n - 1". However, defined as "repunitprimes in binary," the sequence would rate the keyword "base".**bref**"sequence is too short to do any analysis with", for example,A079243, Number of isomorphism classes of associative non-commutative non-anti-associative anti-commutative closed binary operations on a set of order n.**cofr**The sequence represents acontinued fraction, for example, continued fraction expansion of*e*(A003417) or π (A001203).**cons**The sequence is a decimal expansion of a mathematical constant, like*e*(A001113) or π (A000796).**core**A sequence that is of foundational importance to a branch of mathematics, such as the prime numbers (A000040), the Fibonacci sequence (A000045), etc.**dead**This keyword used for erroneous sequences that have appeared in papers or books, or for duplicates of existing sequences. For example,A088552is the same asA000668.**dumb**One of the more subjective keywords, for "unimportant sequences," which may or may not directly relate to mathematics, such aspopular culturereferences, arbitrary sequences from Internet puzzles, and sequences related tonumeric keypadentries.A001355, "Mix digits of pi and e." is one example of lack of importance, andA085808, "Price is Right wheel" (the sequence of numbers on theShowcase Showdownwheel used in the U.S. game show *The Price Is Right*) is an example of a non-mathematics-related sequence, kept mainly for trivia purposes.^{[16]}**easy**The terms of the sequence can be easily calculated. Perhaps the sequence most deserving of this keyword is 1, 2, 3, 4, 5, 6, 7, ...A000027, where each term is 1 more than the previous term. The keyword "easy" is sometimes given to sequences "primes of the form f(m)" where f(m) is an easily calculated function. (Though even if f(m) is easy to calculate for large m, it might be very difficult to determine if f(m) is prime).**eigen**A sequence ofeigenvalues.**fini**The sequence is finite, although it might still contain more terms than can be displayed. For example, the sequence field ofA105417shows only about a quarter of all the terms, but a comment notes that the last term is 3888.**frac**A sequence of either numerators or denominators of a sequence of fractions representing rational numbers. Any sequence with this keyword ought to be cross-referenced to its matching sequence of numerators or denominators, though this may be dispensed with for sequences ofEgyptian fractions, such asA069257, where the sequence of numerators would beA000012. This keyword should not be used for sequences of continued fractions, cofr should be used instead for that purpose.**full**The sequence field displays the complete sequence. If a sequence has the keyword "full", it should also have the keyword "fini". One example of a finite sequence given in full is that of thesupersingular primesA002267, of which there are precisely fifteen.**hard**The terms of the sequence cannot be easily calculated, even with raw number crunching power. This keyword is most often used for sequences corresponding to unsolved problems, such as "How many*n*-spherescan touch another*n*-sphere of the same size?"A001116lists the first ten known solutions.**hear**A sequence with a graph audio deemed to be "particularly interesting and/or beautiful".**less**A "less interesting sequence".**look**A sequence with a graph visual deemed to be "particularly interesting and/or beautiful".**more**More terms of the sequence are wanted. Readers can submit an extension.**mult**The sequence corresponds to amultiplicative function. Term a(1) should be 1, and term a(mn) can be calculated by multiplying a(m) by a(n) if m and n are coprime. For example, inA046970, a(12) = a(3)a(4) = -8 × -3.**new**For sequences that were added in the last couple of weeks, or had a major extension recently. This keyword is not given a checkbox in the Web form for submitting new sequences, Sloane's program adds it by default where applicable.**nice**Perhaps the most subjective keyword of all, for "exceptionally nice sequences."**nonn**The sequence consists of nonnegative integers (it may include zeroes). No distinction is made between sequences that consist of nonnegative numbers only because of the chosen offset (e.g.,*n*^{3}, the cubes, which are all positive from*n*= 0 forwards) and those that by definition are completely nonnegative (e.g.,*n*^{2}, the squares).**obsc**The sequence is considered obscure and needs a better definition.**sign**Some (or all) of the values of the sequence are negative. The entry includes both a Signed field with the signs and a Sequence field consisting of all the values passed through theabsolute valuefunction.**tabf**"An irregular (or funny-shaped) array of numbers made into a sequence by reading it row by row." For example,A071031, "Triangle read by rows giving successive states of cellular automaton generated by "rule 62."**tabl**A sequence obtained by reading a geometric arrangement of numbers, such as a triangle or square, row by row. The quintessential example isPascal's triangleread by rows,A007318.**uned**The sequence has not been edited but it could be worth including in the OEIS. The sequence may contain computational or typographical errors. Contributors are encouraged to edit these sequences.**unkn**"Little is known" about the sequence, not even the formula that produces it. For example,A072036, which was presented to theInternet Oracleto ponder.**walk**"Counts walks (or self-avoiding paths)."**word**Depends on the words of a specific language. For example, zero, one, two, three, four, five, etc. For example, 4, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8 ...A005589, "Number of letters in the English name of n, excluding spaces and hyphens."

^{[15]}

*n*×

*n*magic squarewith prime entries (regarding 1 as a prime) with smallest row sums, is an example of a sequence with offset 3, andA072171, "Number of stars of visual magnitude

*n*." is an example of a sequence with offset -1. Sometimes there can be disagreement over what the initial terms of the sequence are, and correspondingly what the offset should be. In the case of thelazy caterer's sequence, the maximum number of pieces you can cut a pancake into with

*n*cuts, the OEIS gives the sequence as 1, 2, 4, 7, 11, 16, 22, 29, 37, ...A000124, with offset 0, whileMathworldgives the sequence as 2, 4, 7, 11, 16, 22, 29, 37, ... (implied offset 1). It can be argued that making no cuts to the pancake is technically a number of cuts, namely

*n*= 0. But it can also be argued that an uncut pancake is irrelevant to the problem. Although the offset is a required field, some contributors don't bother to check if the default offset of 0 is appropriate to the sequence they are sending in. The internal format actually shows two numbers for the offset. The first is the number described above, while the second represents the index of the first entry (counting from 1) that has an absolute value greater than 1. This second value is used to speed up the process of searching for a sequence. ThusA000001, which starts 1, 1, 1, 2 with the first entry representing a(1) has

**1, 4**as the internal value of the offset field.Author(s)The author(s) of the sequence is (are) the person(s) who submitted the sequence, even if the sequence has been known since ancient times. The name of the submitter(s) is given first name (spelled out in full), middle initial(s) (if applicable) and last name; this in contrast to the way names are written in the reference fields. The e-mail address of the submitter is also given, with the @ character replaced by "(AT)" with some exceptions such as for associate editors or if an e-mail address does not exist. For most sequences after A055000, the author field also includes the date the submitter sent in the sequence.ExtensionNames of people who extended (added more terms to) the sequence, followed by date of extension.

Applications

Sloane's gap

Plot of Sloane's Gap : number of occurrences (Y log scale) of each integer (X scale) in the OEIS database

In 2009, the OEIS database was used by Philippe Guglielmetti to measure the "importance" of each integer number.^{[17]} The result shown in the plot on the right shows a clear "gap" between two distinct point clouds^{[18]} the "uninteresting numbers" (blue dots) and the "interesting" numbers that occur comparatively more often in sequences from the OEIS. It contains essentially prime numbers (red), numbers of the form *a**n* (green) and highly composite numbers (yellow). This phenomenon was studied by Nicolas Gauvrit, Jean-Paul Delahaye and Hector Zenil who explained the speed of the two clouds in terms of algorithmic complexity and the gap by social factors based on an artificial preference for sequences of primes, even numbers, geometric and Fibonacci-type sequences and so on.^{[19]} Sloane's gap was featured on a Numberphile video in 2013.^{[20]}

See also

List of OEIS sequences

## References

*www.alexa.com*. Retrieved 7 August 2019.

*The OEIS Foundation Inc*. Retrieved 2017-11-06.

*The New York Times*. p. C1.

*On-Line Encyclopedia of Integer Sequences*.

*SeqFan mailing list*. Retrieved 2011-11-22.

*SeqFan mailing list*. Retrieved 2011-11-22.

*OEIS wiki*. Retrieved 2011-11-22.

*OEIS Wiki*. Retrieved 2016-05-05.

*On-Line Encyclopedia of Integer Sequences*.

*Pourquoi Comment Combien*(in French).

*Pourquoi Comment Combien*(in French). Retrieved 25 December 2016.

*Numberphile*. 2013-10-15. With Dr. James Grime, University of Nottingham