On-Line Encyclopedia of Integer Sequences

The On-Line Encyclopedia of Integer Sequences (OEIS) is an online database of integer sequences. It was created and maintained by Neil Sloane while a researcher at AT&T Labs. He transferred the intellectual property and hosting of the OEIS to the OEIS Foundation in 2009.[3] 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 March 2021, it contains 341,962 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.

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

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.[5] 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.[6] 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 at was created to simplify the collaboration of the OEIS editors and contributors.[7] 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,[8][9] following a proposal by OEIS Editor-in-Chief Charles Greathouse to choose a special sequence for A200000.[10] A300000 was defined in February 2018, and by end of July 2020 the database contained more than 336,000 sequences.

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 nth term of the sequence.

This part needs a discussion on imputation of data. 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.

The OEIS maintains the lexicographical order of the sequences, so each sequence has a predecessor and a successor (its "context").[11] 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.

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

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.[12] One of the earliest self-referential sequences Sloane accepted into the OEIS was A031135 (later A091967) "a(n) = n-th term of sequence An or -1 if An has fewer than n terms". This sequence spurred progress on finding more terms of A000022. A100544 lists the first term given in sequence An, but it needs to be updated from time to time because of changing opinions on offsets. Listing instead term a(1) of sequence An 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 An contain the number n ?" and the sequences A053873, "Numbers n such that OEIS sequence An contains n", and A053169, "n is in this sequence if and only if n is not in sequence An". 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):

This entry, A046970, was chosen because it contains every field an OEIS entry can have.[13]

Every sequence in the OEIS has a serial 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 shows, the rough correspondence holds.
The 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.".
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.
Sequence 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:
Some keywords are mutually exclusive, namely: core and dumb, easy and hard, full and more, less and nice, and nonn and sign.
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.
Names of people who extended (added more terms to) the sequence, followed by date of extension.
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.[16] The result shown in the plot on the right shows a clear "gap" between two distinct point clouds[17] 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 an (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.[18] Sloane's gap was featured on a Numberphile video in 2013.[19]