\documentstyle[11pt]{article}
\setlength{\textwidth}{6.2in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{.2in}
\setlength{\topmargin}{-0.25in}
\setlength{\headheight}{0in}
\makeatletter
% put a period after section or subsection number in header
\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else 
     \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname.\hskip .75em }\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@ 
        \begingroup #6\relax
          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline
         {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname}\fi
                    #7}\else
        \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
                      {#7}\addcontentsline
                           {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                             \protect\numberline{\csname the#1\endcsname}\fi
                       #7}}\fi
     \@xsect{#5}}
\def\@begintheorem#1#2{\it \trivlist \item[\hskip \labelsep{\bf #1\ #2.}]}
\makeatother

\newcommand{\hsp}{\hspace*{\parindent}}
\newcommand{\vsp}{\vspace{.1in}}

\thispagestyle{empty}
\begin{document}
\pagestyle{myheadings}
\markright{\sc the electronic journal of combinatorics 1 (1994), \#F1\hfill}
\thispagestyle{empty}
\begin{center}
{\Large {\bf An On-Line Version of the Encyclopedia of \\ \smallskip
Integer Sequences}} \\
\vspace{1.5\baselineskip}
{\em N.~J.~A. Sloane} \\
\vspace{.25\baselineskip}
Mathematical Sciences Research Center \\
AT\&T Bell Laboratories \\
Murray Hill, New Jersey 07974, USA \\
\vspace{1\baselineskip}
\today \\
\vspace{1.5\baselineskip}
{\bf ABSTRACT}
\vspace{.5\baselineskip}
\end{center}
\setlength{\baselineskip}{1.5\baselineskip}

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

\section{The on-line version}
\hsp
{\em A Handbook of Integer Sequences} \cite{Sl73} 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,
\begin{center}
The On-Line Encyclopedia of Integer Sequences,
\end{center}
can now be accessed by electronic mail.
To use it, send email to
\begin{center}
sequences@research.att.com
\end{center}
containing lines of the form
\begin{flushleft}
lookup~~~5~~~14~~~42~~~132
\end{flushleft}
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.
\section{Background}
\hsp
The new version was produced with the assistance of Simon Plouffe of the Universit\'{e} du Qu\'{e}bec \`{a} Montr\'{e}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 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.
\section{The format of the reply}
\hsp
The reply to the above query illustrates the format used:
\begin{flushleft}
\%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
\end{flushleft}
\%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 \cite{Sl73}.
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 \cite{SP} 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.

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, \ldots$ or $2,1,3,4,7,11, \ldots$?),
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:
\begin{flushleft}
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
\end{flushleft}
\section{What sequences are included?}
\hsp
To be included, a sequence should satisfy the following conditions.

\vsp
\noindent{\bf Rule~1.}
The sequence must consist of nonnegative integers.

\vsp
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.

\vsp
\noindent{\bf Rule~2.}
The sequence must be infinite.

\vsp
A few exceptions have been made to this rule for certain
important number-theoretic sequences, such as Euler's
idoneal (or suitable) numbers.

\vsp
\noindent{\bf Rule~3.}
The first nontrivial term in the sequence (i.e. the first that exceeds 1) must be less than 1000.

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

\vsp
\noindent{\bf 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.
\section{An example}
\hsp
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, \ldots$ we calculated that these
numbers were $1,1,2,3,2,3,3,5, \ldots~$.
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 \cite{Al73}, and supplied a recurrence that we had overlooked.
(However, it is only fair to add that \cite{Al73} did not find the elegant exact formula for the
$n$-th term that we give in \cite{BSW}.
There is also an error in the values given in \cite{Al73}:
$\chi (16)$ should be 9, not 16.)
\section{The new book and the Maple package}
\hsp
We are planning to make the new version available also as a book
\cite{BSW} 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.
\section{Abbreviations}
\hsp
The following abbreviations may be encountered in replies to lookup requests:
b.c.c.: body-centered cubic lattice;
$C(n)$: $n$-th Catalan number (see A0108: $1,1,2,5,14,52, \ldots$);
$C(n,k)$: binomial coefficient $n!/ k!(n-k)!$;
$F(n)$: $n$-th Fibonacci number (see A0045: $1,1,2,3,5,8, \ldots$);
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, \ldots$);
$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 {\em multiplicative encoding} of a triangular array
$\{t(n,k) \ge 0$; $n=0,1, \ldots ; 0 \le k \le n \}$ refers to the sequence whose $n$th term is
$$\prod_{k=0}^n p_{k+1}^{t(n,k)} ~,$$
where $p_1 =2$, $p_2=3 , \ldots$ are the primes.
\section*{Acknowledgements}
\hsp
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.

\begin{thebibliography}{99}
\bibitem{Al73}
A. Altshuler,
Construction and enumeration of regular maps on the torus,
{\em Discrete Math.}, {\bf 4} (1973), 201--217.
\bibitem{BSW}
M. Bernstein, N.~J.~A. Sloane and P.~E. Wright,
Sublattices of the hexagonal lattice,
in preparation.
\bibitem{Sl73}
N.~J.~A. Sloane,
{\em A Handbook of Integer Sequences},
Academic Press, NY, 1973.
\bibitem{SP}
N.~J.~A. Sloane and S. Plouffe,
{\em The Encyclopedia of Integer Sequences}, in preparation.
\end{thebibliography}
\end{document}
