The Online Encyclopedia of Integer Sequences

Suppose that, in the course of an investigation, you stumble upon a string of whole numbers. You are convinced that there must be a pattern, but you cannot find it. All you have to do is to type the string into a database called OEIS — or simply “Slone’s” — and, if the string is recognized, an entire infinite sequence is revealed. If the string belongs to several sequences, several choices are offered. OEIS is a great boon to both professional mathematicians and applied scientists in fields like physics, chemistry, astronomy and biology.


The Home page of OEIS:

Sequences and Series

For centuries, mathematicians have delighted in the study of sequences and series, and particularly those with an infinite number of terms. A sequence is a list of terms, for example, the sequence of natural numbers

\displaystyle 1, 2, 3, 4, 5, 6, 7, 8, \dots

and a series is a sum, such as the harmonic series

\displaystyle 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \cdots \,.

The question of whether an infinite series like this has a finite sum or diverges to infinity has led to some major developments in mathematical analysis. The harmonic series diverges, but the sum of reciprocals of the squares converges:

\displaystyle 1 + \frac{1}{2^2} + \frac{1}{3^2} + \frac{1}{4^2} + \frac{1}{5^2} + \cdots = \frac{\pi^2}{6} \, .

This remarkable result was proved by Leonhard Euler.


Sequences all of whose terms are integers are of particular interest in many areas of both pure and applied maths. For several decades, a collection of integer sequences has been maintained and extended. It goes by the name “Online Encyclopedia of Integer Sequences”, or OEIS for short. It was established by Neil Sloane while he was a researcher at AT&T Bell Labs.

Ownership of the database has now been transferred to the OEIS Foundation. The encyclopedia is often referred to as Sloane’s. OEIS is the largest collection of its kind, with more than a third of a million entries, and it continues to grow rapidly.

Many of the sequences in OEIS come from number theory and combinatorics. There are also many sequences important in physics, chemistry, biology, astronomy and other areas of science.

The simplest infinite sequence must be {\{0,0,0, \dots \}}. Many sequences are well known: the sequence of squares, {\{1, 4, 9, 16, \dots \}}, cubes {\{1, 8, 27, 64, \dots \}}, and so on. Some sequences are of vital importance, others are more light-hearted. Each sequence is given an identifier of the form A123456 or similar.

There are just two conditions for acceptance of a sequence: it must be well-defined (and unambiguous), and it must be interesting. The first condition is objective while the second is subjective; a sequence of interest to me might not be to you. Being well-defined does not mean that the sequence is completely known. Consider the sequence of prime numbers {\{2, 3, 5, 7, 11, \dots \}}. It is clear that every positive integer (greater than 1) is either prime or composite, but we have no formula for the {n}-th prime.

A Few Examples

Type in the string {\{6, 28, 496 \}} and you will discover that the following value is 8198. This is the sequence of “perfect numbers”. These are numbers that equal the sum of their divisors: 6 = 1+2+3, 28 = 1 + 2+4+7+14 and so on. Perfect numbers have been studied since the time of Euclid but it is still not known if there are any odd perfect numbers.

Unsurprisingly, the Fibonacci sequence is included in the database. But there are numerous other less well-known sequences. For fun, type in the sequence {\{1, 2, 3, 4, 5, 6, 7, 8, 9 \}}. Obviously, the natural numbers emerge, sequence A000027, but so do several other possibilities. Now omit any of the nine digits and you will be surprised by the results. Omitting 6 gives numbers that are powers of primes (numbers of the form {p^k}). Omitting 7 gives a Hamming sequence, omitting 8 gives cube-free numbers. Exploring OEIS like this can be very satisfying.


OEIS is in some ways like a finger-print database. From just a few terms, we may be able to discover the entire sequence, or at least pin it down to a few options by seeking the given string in the collection of hundreds of thousands of sequences. Thus, OEIS has been of great use to mathematicians and scientists, and it continues to grow in both size and utility.


{\bullet} OEIS Offician Website:

Last 50 Posts