An On-Line Version of the Encyclopedia of Integer Sequences

N. J. A. Sloane Mathematical Sciences Research Center AT&T Bell Laboratories Murray Hill, New Jersey 07974, USA

June 26, 1994

ABSTRACT

Twenty-one years after the publication of A Handbook of Integer Sequences, a greatly expanded version of this collection can now be accessed by electronic mail.

1. The on-line version

A Handbook of Integer Sequences [3] was published by Academic Press in 1973, and contained an annotated list of 2372 sequences arranged in lexicographic order. Since then a great deal of new material has been added, and many improvements have been made to the original entries. The purpose of this note is to announce that the new version of the collection,

The On-Line Encyclopedia of Integer Sequences,

can now be accessed by electronic mail. To use it, send email to

sequences@research.att.com

containing lines of the form

lookup 5 14 42 132

There may be up to five such lines in a message. The program will automatically inform you of the first seven sequences in the collection that match each line.

2. Background

The new version was produced with the assistance of Simon Plouffe of the Université du Québec à Montréal. By 1991 a cubic meter of new material (letters, preprints, reprints, books, technical reports, all containing new sequences) had accumulated in my office, and if Simon the electronic journal of combinatorics 1 (1994), #F1 2

Plouffe had not written offering to help, the new version would probably never have been produced. This material, plus a great deal more that has arrived in the last three years (including a considerable amount of electronic mail) has been processed, and there are now about 5000 sequences in the table. I started collecting sequences in graduate school at Cornell University in 1965, so the collection spans almost thirty years. Getting food at Bell Labs late last night, I thought back to all the vending machines I’ve used over the years while collecting sequences, at Cornell, Brown University and Bell Labs (three magnificent libraries). Originally I stored the sequences on punched cards, but now they are recorded on magnetic disks. The technology has improved; the food is as bad as ever.

3. The format of the reply

The reply to the above query illustrates the format used:

%I A0108 N0577 %S A0108 1,1,2,5,14,42,132,429,1430,4862,16796,58786,208012,742900,2674440, %T A0108 9694845,35357670,129644790,477638700,1767263190,6564120420,24466267020 %N A0108 Catalan numbers: $C(2n,n)/(n+1)$. %R A0108 AMM 72 973 65. RCI 101. C1 53. PLC 2 109 71. MAG 61 211 88. %O A0108 0,3 %A A0108 njas

%I is the identification line: Annnn is the absolute catalogue number of the sequence, and Nnnnn (if present) is the number of the sequence in [3]. The %S and %T lines give the initial terms, %N is the name, %R gives references, %F gives a formula (if not present in the %N line), and %A indicates who entered the sequence. A %Y line may contain cross-references to other sequences. (This will not be helpful to users of the on-line version, but will be important when [4] becomes available.) The %O, or “offset”, line contains two numbers. The first gives the subscript of the initial term in the sequence (in the above example the first term corresponds to n = 0), and the second gives the position of the first entry that exceeds 1 (in the example this is the third term).

References to journals give volume, page, year, and references to books give the page number. the electronic journal of combinatorics 1 (1994), #F1 3

When submitting a request, use the format “lookup 60 168 360” with the numbers separated by spaces, not commas. The reply will give only the first seven matches found. Of course, if there are seven matches, you should try again giving more terms.

Keep in mind that the initial terms of a sequence are often ill-defined (does one start counting graphs, say, at 0 nodes or at 1 node? do the Lucas numbers begin 1, 3, 4, 7, 11, … or 2, 1, 3, 4, 7, 11, …?), so it is best to omit the first term or two when looking up a sequence. For similar reasons you could also try adding or subtracting 1 from each term, or dividing out by any obvious common factor.

If your sequence is not in the table, you might consider sending it to me for inclusion (preferably by electronic mail and in the above format, although any format will be accepted). If possible send enough terms to fill two lines on the screen, about 150 characters including separating commas. Please give precise bibliographical details, and send copies of any documentation to me at the following address:

N. J. A. Sloane, AT&T Bell Labs, Room 2C-376, 600 Mountain Avenue, Murray Hill, NJ 07974, USA email: njas@research.att.com fax: 908 582-3340 voice: 908 582-2005

4. What sequences are included?

To be included, a sequence should satisfy the following conditions.

Rule 1. The sequence must consist of nonnegative integers.

Sequences with varying signs have been replaced by their absolute values (so remember when reading replies to the on-line service that any minus signs have been suppressed).

Interesting sequences of fractions have been entered by numerators and denominators separately. Arrays have been entered by rows, columns or diagonals, as appropriate, and in some cases by the multiplicative representation described in Section 7. Some sequences of real numbers have been replaced by their integer parts, others by the nearest integers.

Rule 2. The sequence must be infinite.

A few exceptions have been made to this rule for certain important number-theoretic sequences, such as Euler’s idoneal (or suitable) numbers. the electronic journal of combinatorics 1 (1994), #F1 4

Rule 3. The first nontrivial term in the sequence (i.e. the first that exceeds 1) must be less than 1000.

The position of the sequence in the lexicographic order in the table is determined by the terms of the sequence beginning at this point.

Rule 4. The sequence must be well-defined and interesting. Ideally it should have appeared somewhere in the scientific literature, although there are many exceptions to this. Enough terms must be known to distinguish the sequence from its neighbors in the table.

5. An example

The following example illustrates a recent successful application of the table. While investigating a problem arising from cellular radio, Mira Bernstein, Paul Wright and I were led to consider the number of sublattices of index n of the planar hexagonal lattice. For n = 1, 2, 3, … we calculated that these numbers were 1, 1, 2, 3, 2, 3, 3, 5, …. To our surprise, the table revealed that this sequence, A3051, had arisen in 1973 in an apparently totally different context, that of enumerating maps on a torus [1], and supplied a recurrence that we had overlooked. (However, it is only fair to add that [1] did not find the elegant exact formula for the n-th term that we give in [2]. There is also an error in the values given in [1]: χ(16) should be 9, not 16.)

6. The new book and the Maple package

We are planning to make the new version available also as a book [2] and as part of a Maple package (probably prepared by Simon Plouffe and myself in collaboration with Bruno Salvy).

Each of the three versions has its special uses. The on-line version provides a rapid lookup service for identifying sequences, locating them in the literature, or producing further terms. The Maple package will in addition try to find formulae, recurrences or generating functions (even if the sequence is not in the table), and furthermore will apply a series of transformations to a given sequence and then look up the transformed sequences in the table. The advantage of the book are that it will be possible to browse through it, the interrelationships between sequences will be visible, more algebraic information will be provided, and diagrams will illustrate the more important sequences.

7. Abbreviations

The following abbreviations may be encountered in replies to lookup requests: b.c.c.: bodycentered cubic lattice; C(n): n-th Catalan number (see A0108: 1, 1, 2, 5, 14, 52, …); C(n, k): binomial coefficient n!/k!(n − k)!; F (n): n-th Fibonacci number (see A0045: 1, 1, 2, 3, 5, 8, …); f.c.c.: face-centered cubic lattice; h.c.p.: hexagonal close-packing; L(n): n-th Lucas number (see A0204: 1, 3, 4, 7, 11, 18, …); n: either a typical index (as in “a(n) = a(n−1)+2a(n−3)”), or a typical term in the sequence, as in “6n − 1, 6n + 1 are twin primes”); w.r.t.: with respect to. The multiplicative encoding of a triangular array {t(n, k) ≥ 0; n = 0, 1, …; 0 ≤ k ≤ n} refers to the sequence whose nth term is

∏_{k=0}^{n} p_{k+1}^{t(n,k)} ,

where p_{1} = 2, p_{2} = 3, … are the primes.

Acknowledgements

Besides Simon Plouffe, who has helped in innumerable ways, I am indebted to a large number of correspondents (more than 300 at the last count) who have contributed new sequences. It is impossible to list all their names, but I am especially grateful to Martin Gardner, Richard Guy, Colin Mallows, Robert Robinson, Jeffrey Shallit and Robert Wilson for their contributions, as well as the late Victor Meally, John Riordan and Herman Robinson. Mira Bernstein helped process the most recent correspondence, and several friends in the Unix room at Bell Labs have helped with the computer programs.

References

[1] A. Altshuler, Construction and enumeration of regular maps on the torus, Discrete Math., 4 (1973), 201–217.

[2] M. Bernstein, N. J. A. Sloane and P. E. Wright, Sublattices of the hexagonal lattice, in preparation.

[3] N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, NY, 1973.

[4] N. J. A. Sloane and S. Plouffe, The Encyclopedia of Integer Sequences, in preparation.