On-Line Encyclopedia of Integer Sequences

On-Line Encyclopedia of Integer Sequences
URL http://oeis.org/classic
Created by Neil Sloane
Launched 1996 (1996)

The On-Line Encyclopedia of Integer Sequences (OEIS), also cited simply as Sloane's, is a freely-available online database of integer sequences, created and maintained by N. J. A. Sloane, a researcher at AT&T Labs, and originally hosted on his website. In October 2009 the intellectual property and hosting of the OEIS have been transferred to the OEIS Foundation.[1]

OEIS records information on integer sequences of interest to both professional mathematicians and amateurs, and is widely cited. As of 11 May 2010 (2010 -05-11) it contains over 175,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.

Contents

History

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

  1. A Handbook of Integer Sequences (1973, ISBN 0-12-648550-X), containing 2,372 sequences and assigned N-numbers from 0000 to 2371.
  2. The Encyclopedia of Integer Sequences with Simon Plouffe (1995, ISBN 0-12-558630-2), containing 5,488 sequences and assigned M-numbers from 0000 to 5487.

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). 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.[2]

As a spin-off from the database work, Sloane founded the Journal of Integer Sequences in 1998.[3]

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.

Non-integers

Besides integer sequences, the OEIS also catalogs sequences of fractions, the digits of transcendental numbers, complex numbers and 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 order Farey sequence, \textstyle {1 \over 5}, {1 \over 4}, {1 \over 3}, {2 \over 5}, {1 \over 2}, {3 \over 5}, {2 \over 3}, {3 \over 4}, {4 \over 5}, 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 as decimal expansions (here 3, 1, 4, 1, 5, 9, 2, 6, ... (A000796)) or continued fraction expansions (here 3, 7, 15, 1, 292, 1, ... (A001203)).

Conventions

The OEIS is currently limited to plain ASCII text, so it 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, sometimes referred to without the leading zeros, e.g., A315 rather than A000315.

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.

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_\phi(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"). OEIS normalizes the sequences for lexicographical ordering, (usually) ignoring initial zeros or ones and also the sign of each element. Sequences of weight distribution codes often omit periodically recurring zeros.

For example, consider: the prime numbers, the palindromic primes, the Fibonacci sequence, the lazy caterer's sequence, and the coefficients in the series expansion of \textstyle {{\zeta(n + 2)} \over {\zeta(n)}}. 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, ...

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

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

Sequence #4: 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, ...

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

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.[4]

One of the earliest self-referential sequences Sloane accepted into the OEIS was A031135 (later A091967) "a(n) = n-th term of sequence An". This sequence spurred progress on finding more terms of A000022. Some sequences are both finite and listed in full (keywords "fini" and "full"); these sequences will not always be long enough to contain a term that corresponds to their OEIS sequence number. In this case the corresponding term a(n) of A091967 is undefined.

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):

An abridged example of a typical OEIS entry

This entry, A046970, was chosen because, with the exception of a Maple program, it contains every field an OEIS entry can have.

ID Number: A046970
Sequence:  1,3,8,3,24,24,48,3,8,72,120,24,168,144,192,3,288,24,360,72,
           384,360,528,24,24,504,8,144,840,576,960,3,960,864,1152,24,
           1368,1080,1344,72,1680,1152,1848,360,192,1584,2208,24,48,72,
           2304,504,2808,24,2880,144,2880,2520,3480,576
Signed:    1,-3,-8,-3,-24,24,-48,-3,-8,72,-120,24,-168,144,192,-3,-288,
           24,-360,72,384,360,-528,24,-24,504,-8,144,-840,-576,-960,-3,
           960,864,1152,24,-1368,1080,1344,72,-1680,-1152,-1848,360,
           192,1584,-2208,24,-48,72,2304,504,-2808,24,2880,144,2880,
           2520,-3480,-576
Name:      Generated from Riemann Zeta function: coefficients in series
              expansion of Zeta(n+2)/Zeta(n).
Comments:  ...
           Apart from signs also Sum_{d|n} core(d)^2*mu(n/d) where core(x) is
              the squarefree part of x. - Benoit Cloitre
              (abcloitre(AT)modulonet.fr), May 31 2002
References M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions,
              Dover Publications, 1965, pp. 805-811.
Links:     Wikipedia, Riemann zeta function.
Formula:   Multiplicative with a(p^e) = 1-p^2. a(n) = Sum_{d|n} mu(d)*d^2.
Example:   a(3) = -8 because the divisors of 3 are {1, 3}, and mu(1)*1^2 + mu(3)*3^2 =
              -8.
           a(4) = -3 because the divisors of 4 are {1, 2, 4}, and mu(1)*1^2 +
              mu(2)*2^2 + mu(4)*4^2 = -3
Math'ca:   muDD[d_] := MoebiusMu[d]*d^2; Table[Plus @@ muDD[Divisors[n]], {n,
              60}] (Lopez)
Program:   (PARI) A046970(n)=sumdiv(n,d,d^2*moebius(d)) (Benoit Cloitre)
See also:  Sequence in context: A016623 A046543 A035292 this_sequence A058936
              A002017 A086179
           Adjacent sequences: A046967 A046968 A046969 this_sequence A046971
              A046972 A046973
           Cf. A027641 and A027642.
Keywords:  sign,mult
Offset:    1
Author(s): Douglas Stoll, dougstoll(AT)email.msn.com
Extension: Corrected and extended by Vladeta Jovovic (vladeta(AT)Eunet.yu),
              Jul 25 2001
           ...

Entry fields

ID number

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 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(2nn) is not divisible by the square of an odd prime. January 1, 2001
A060001 Fibonacci(n)!. March 14, 2001
A066288 Number of 3-dimensional polyominoes (or polycubes) with n cells and symmetry group of order exactly 24. January 1, 2002
A075000 Smallest number such that n·a(n) is a concatenation of n consecutive integers ... August 31, 2002
A078470 Continued fraction for ζ(3/2) January 1, 2003
A080000 Number of permutations satisfying −k ≤ p(i) − i ≤ r and p(i) − i February 10, 2003
A090000 Length of longest contiguous block of 1s in binary expansion of nth prime. November 20, 2003
A091345 Exponential convolution of A069321(n) with itself, where we set A069321(0) = 0. January 1, 2004
A100000 Marks from the 22000-year-old Ishango bone from the Congo. November 7, 2004
A102231 Column 1 of triangle A102230, and equals the convolution of A032349 with A032349 shift right. January 1, 2005
A110030 Number of consecutive integers starting with n needed to sum to a Niven number. July 8, 2005
A112886 Triangle-free positive integers. January 12, 2006
A120007 Möbius transform of sum of prime factors of n June 2, 2006

Even for sequences in the book predecessors to the OEIS, the ID numbers are not the same. The 1973 Handbook of Integer Sequences contained about 2400 sequences, which were numbered by lexicographic order (the letter M plus 4 digits, zero-padded where necessary), and the 1995 Encyclopedia of Integer Sequences contained 5487 sequences, also numbered by lexicographic order (the letter N 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.

URL

The URL field gives the preferred format for the URL to link to the sequence in question, to simplify cut and paste.

Sequence

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

Any negative signs are stripped from this field, and the values with signs are put in the Signed field.

Signed

The signed field is almost the same thing as the sequence field except that it shows negative signs. This field is only included for sequences that have negative values. Any entry with this field must have the keyword "sign".

Name

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

Comments

The comments field is for information about the sequence that doesn't 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-crossing cevians within a triangle so that two of its sides are each n-partitioned," while Sloane points out the unexpected relationship between centered hexagonal numbers (A003215) and second Bessel polynomials (A001498) in a comment to A003215.

If no name is given for a comment, the comment was made by the original submitter of the sequence.

Maple, Mathematica, and other programs

Maple and Mathematica are the preferred programs for calculating sequences in the OEIS, and they both get their own field labels, "Maple" and "Mathematica." As of Jan 2009, Mathematica is the most popular choice with over 25,000 Mathematica programs followed by 13,000 Maple programs. There are 11,000 programs in PARI and 3000 in other languages, all of which are labelled with a generic "Program" field label and the name of the program in parentheses.

If there is no name given, the program was written by the original submitter of the sequence.

See also

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:

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 Z4 of index n2.
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 on
associated 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.

Keywords

The OEIS has its own standard set of four or five letter keywords that characterize each sequence:[5]

Some keywords are mutually exclusive, namely: core and dumb, easy and hard, full and more, less and nice, and nonn and sign.

Offset

The offset is the index of the first term given. For some sequences, the offset is obvious. For example, if we list the sequence of square numbers as 0, 1, 4, 9, 16, 25 ..., the offset is 0; while if we list it as 1, 4, 9, 16, 25 ..., the offset is 1. The default offset is 0, and most sequences in the OEIS have offset of either 0 or 1. Sequence A073502, the magic constant for n×n magic square with prime entries (regarding 1 as a prime) with smallest row sums, is an example of a sequence with offset 3, and A072171, "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 the lazy 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, while Mathworld gives 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. Thus A000001, 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 of the sequence is the person who submitted the sequence, even if the sequence has been known since ancient times. The name of the submitter 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.

Searching the OEIS

The previous version of the main look-up page of the OEIS offered three ways to look up sequences, and the right radio button had to be selected. There was an advanced look-up page, but its usefulness has been integrated into the main look-up page in a major redesign of the interface in January 2006.

Enter a sequence

Enter a few terms of the sequence, separated by either spaces or commas (or both).

You can enter negative signs, but they will be ignored. For example, 0, 3, 7, 13, 20, 28, 36, 43, 47, 45, 32, 0, −64, n2 minus the nth Fibonacci number, is a sequence that is technically not in the OEIS, but the very similar sequence 0, −3, −7, −13, −20, −28, −36, −43, −47, −45, −32, 0, 64, is in the OEIS and will come up when one searches for its reversed signs counterpart.

However, the search can be forced to match signs by using the prefix "sign:" in the search string. This is especially useful for sequences like A008836 that consist exclusively of positive and negative ones.

One can enter as little as a single integer or as much as four lines of terms. Sloane recommends entering six terms, a(2) to a(7), in order to get enough results, but not too many results. There are cases where entering just one integer gives precisely one result, such as 6610199 brings up just A133207, the strobogrammatic primes which are not palindromic). There are also cases where one can enter many terms and still not narrow the results down very much.

Enter a word

Enter a string of alphanumerical characters. Certain characters, like accented foreign letters, are not allowed. Thus, to search for sequences relating to Znám's problem, try enter it without the accents: "Znam's problem." The handling of apostrophes has been greatly improved in the 2006 redesign. The search strings "Pascal's triangle," "Pascals triangle" and "Pascal triangle" all give the desired results.

To look up most polygonal numbers by word, try "n-gonal numbers" rather than "Greek prefix-gonal numbers" (e.g., "47-gonal numbers" instead of "heptaquartagonal numbers"). Beyond "dodecagonal numbers," word searching with the Greek prefixes might fail to yield the desired results.

Enter a sequence number

Enter the modern OEIS A number of the sequence, with the letter A and with or without zero-padding. As of 2006, the old M and N sequence numbers will yield the proper result as search strings, e.g., a search for M0422 will correctly bring up A006047, the number of entries in nth row of Pascal's triangle not divisible by 3 (M0422 in the book The Encyclopedia of Integer Sequences) and not A000422, concatenation of numbers from n down to 1.

External links

Publications on OEIS by Neil Sloane

Other references