sloane-5.0.0: sloane.1
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "SLOANE" "1" "22 March 2016" "User Manual" "Version 5.0.0"
.hy
.SH NAME
.PP
sloane \- lookup integer sequences, OEIS A\-numbers, etc.
.SH SYNOPSIS
.PP
\f[C]sloane\ [\-n\ N]\ [\-\-all]\ [\-\-oeis]\ TERMS...\f[]
.PD 0
.P
.PD
\f[C]sloane\ [\-\-invert]\ \-\-filter\f[]
.PD 0
.P
.PD
\f[C]sloane\ (\-\-update|\-\-version|\-\-help)\f[]
.SH DESCRIPTION
.PP
\f[C]sloane\f[] provides a command line interface to Sloane\[aq]s OEIS
(The On\-Line Encyclopedia of Integer Sequences).
It can be used offline (the default) as well as online (with the
\f[C]\-\-oeis\f[] option).
The first time \f[C]sloane\f[] is used in offline mode the user will be
asked to run \f[C]sloane\ \-\-update\f[].
This will download \f[C]https://oeis.org/{names.gz,stripped.gz}\f[] and
unpack them into \f[C]\&.oeis\-data/{names,stripped}\f[] in the home
directory.
Alternatively, one can do this by hand using \f[C]wget\f[] and
\f[C]gunzip\f[], say, if prefered.
.PP
A common way to use \f[C]sloane\f[] is to search for entries matching a
sequence of consecutive terms:
.IP
.nf
\f[C]
sloane\ 1,3,19,183,2371,38703
\f[]
.fi
.PP
At the time of writing this would return
.IP
.nf
\f[C]
{
\ \ "trail":\ ["{1,3,19,183,2371,38703}"],
\ \ "hops":\ "A006531",
\ \ "name":\ "Semiorders\ on\ n\ elements.",
\ \ "seq":\ [1,1,3,19,183,2371,38703,763099,17648823,468603091,...]
}
\f[]
.fi
.PP
The \f[C]\-\-filter\f[] option can be very useful when checking a large
number of sequences.
In this mode \f[C]sloane\f[] expects input in the form returned by
\f[B]hops\f[](1).
It reads standard input line\-by\-line, if the sequence in the right
hand side of the entry read is in the local database, then the entry is
returned to standard output; if not, it is ignored.
This way one can quickly filter out the sequences from the input that
are in the local database.
To also lookup the names of those sequences one could run
.IP
.nf
\f[C]
sloane\ \-\-filter\ <FILE\ |\ sloane
\f[]
.fi
.PP
If the sequences one wishes to filter are not already in form returned
by \f[C]hops\f[] then one may mold them into that form using
\f[C]hops\ \-\-tag\f[].
See the \f[B]EXAMPLES\f[] section for more usage examples.
.SH OPTIONS
.TP
.B \-\-oeis
Online search; lookup the provided terms in Sloane\[aq]s On\-Line
Encyclopedia of Integer Sequences (OEIS).
.RS
.RE
.TP
.B \-n \f[I]N\f[]
Fetch at most this many entries (default: 5).
.RS
.RE
.TP
.B \-\-all
Fetch all matching entries (equivalent to \-n 999999).
.RS
.RE
.TP
.B \-\-invert
Return sequences \f[I]not\f[] in the database (used with
\f[C]\-\-filter\f[]).
.RS
.RE
.TP
.B \-\-update
Update the local database.
.RS
.RE
.TP
.B \-\-version
Print version information.
.RS
.RE
.TP
.B \-\-help
Briefly describe the available options.
.RS
.RE
.SH EXAMPLES
.PP
Lookup A\-numbers:
.IP
.nf
\f[C]
$\ sloane\ A000111\ A000112
{
\ \ "hops":\ "A000111",
\ \ "name":\ "Euler\ or\ up/down\ numbers:\ e.g.f.\ sec(x)\ +\ tan(x)...",
\ \ "seq":\ [1,1,1,2,5,16,61,272,1385,7936,50521,353792,2702765,22368256,...]
}
{
\ \ "hops":\ "A000112",
\ \ "name":\ "Number\ of\ partially\ ordered\ sets\ (\\"posets\\")\ with\ n\ unlabeled\ elements.",
\ \ "seq":\ [1,1,2,5,16,63,318,2045,16999,183231,2567284,46749427,...]
}
\f[]
.fi
.PP
Lookup a sequence (limit to at most two results):
.IP
.nf
\f[C]
$\ sloane\ \-n2\ 1,1,2,5,15,52,203,877,4140,21147,115975,678570
{
\ \ "trail":\ ["{1,1,2,5,15,52,203,877,4140,21147,115975,678570}"],
\ \ "hops":\ "A000110",
\ \ "name":\ "Bell\ or\ exponential\ numbers:\ number\ of\ ways\ to\ partition\ a\ set\ of\ n...",
\ \ "seq":\ [1,1,2,5,15,52,203,877,4140,21147,115975,678570,4213597,27644437,...]
}
{
\ \ "trail":\ ["{1,1,2,5,15,52,203,877,4140,21147,115975,678570}"],
\ \ "hops":\ "A192127",
\ \ "name":\ "Number\ of\ set\ partitions\ of\ {1,\ ...,\ n}\ that\ avoid\ 6\-nestings.",
\ \ "seq":\ [1,1,2,5,15,52,203,877,4140,21147,115975,678570,4213596,27644383,...]
}
\f[]
.fi
.PP
Lookup a sequence generated by \f[B]hops\f[](1):
.IP
.nf
\f[C]
$\ hops\ \[aq]y=1+integral(2*y^2\-y);laplace(y)\[aq]\ |\ sloane
{
\ \ "trail":["y=1+integral(2*y^2\-y);laplace(y)"],
\ \ "hops":"A000670",
\ \ "name":"Fubini\ numbers:\ number\ of\ preferential\ arrangements\ of\ n\ labeled\ ...",
\ \ "seq":[1,1,3,13,75,541,4683,47293,545835,7087261,102247563,1622632573,...]
}
{
\ \ "trail":["y=1+integral(2*y^2\-y);laplace(y)"],
\ \ "hops":"A034172","name":"Nearest\ integer\ to\ n!/(2*log(2)^(n+1)).",
\ \ "seq":[1,1,3,13,75,541,4683,47293,545835,7087261,102247563,1622632573,...]
}
\f[]
.fi
.PP
Fetch the OEIS entry whose A\-number is A006531:
.IP
.nf
\f[C]
sloane\ \-\-oeis\ id:A006531
\f[]
.fi
.PP
Return at most 3 results of a free text search:
.IP
.nf
\f[C]
sloane\ \-n\ 3\ \-\-oeis\ "(2+2)\-free\ posets"
\f[]
.fi
.SH NOTES
.PP
Please use the \f[C]\-\-oeis\f[] option with some moderation as not to
overburden the OEIS\-server; see OEIS\[aq] policy on searching the
database (http://oeis.org/wiki/Welcome#Policy_on_Searching_the_Database).
.SH SEE ALSO
.PP
\f[B]hops\f[](1) <http://akc.is/hops>
.PD 0
.P
.PD
Source code for \f[C]sloane\f[]: <http://akc.is/sloane>
.SH AUTHOR
.PP
Anders Claesson <http://akc.is>