packages feed

sloane-4.2.0: sloane.1

.\" Automatically generated by Pandoc 1.15.1
.\"
.hy
.TH "SLOANE" "1" "4 Sep 2015" "User Manual" "Version 4.2.0"
.SH NAME
.PP
sloane \- lookup integer sequences, OEIS A\-numbers, etc.
.SH SYNOPSIS
.PP
\f[C]sloane\ [\-\-long]\ [\-k\ KEYS]\ [\-n\ N]\ [\-\-all]\ [\-\-monochrome]\ [\-\-json]\ [\-\-oeis]\ TERMS...\f[]
.PD 0
.P
.PD
\f[C]sloane\ [\-\-invert]\ \-\-filter\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).
Local searches are faster but a bit less flexible.
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]
S\ A006531\ 1,1,3,19,183,2371,38703,763099,17648823,468603091,14050842303,
N\ A006531\ Semiorders\ on\ n\ elements.
\f[]
.fi
.PP
As shown here the default is to return the sequence (S) and the name (N)
fields.
These are the only fields that are available in offline mode.
In online mode all fields are available.
To select among the fields use the \f[C]\-k\f[] option, or, to select
all fields, use to \f[C]\-\-long\f[] option.
The following search would show the sequence, name, comments, and
formula fields:
.IP
.nf
\f[C]
sloane\ \-k\ SNCF\ \-\-oeis\ 1,3,19,183,2371,38703
\f[]
.fi
.PP
One can also lookup A\-numbers or do a free text search; see the
\f[B]EXAMPLES\f[] section.
.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[] reads standard input line\-by\-line, if the
sequence read is in the local database, then it 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 be concrete, assume that \f[I]FILE\f[] contains one sequence per
line.
Then
.IP
.nf
\f[C]
sloane\ \-\-filter\ <FILE
\f[]
.fi
.PP
returns the subset of the sequences in \f[I]FILE\f[] 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
The way this works is that if \f[C]sloane\f[] is called without search
terms then it reads from standard input.
.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 \-k \f[I]KEYS\f[]
Keys of fields to print (default: SN).
.RS
.RE
.TP
.B \-\-long
Long format; print all fields.
.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 \-\-monochrome
Do not colorize the output.
Useful when piping the output to another program.
.RS
.RE
.TP
.B \-\-json
Output results is JSON format.
.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

S\ A000111\ 1,1,1,2,5,16,61,272,1385,7936,50521,353792,2702765,
N\ A000111\ Euler\ or\ up/down\ numbers:\ e.g.f.\ sec(x)\ +\ tan(x)..

S\ A000112\ 1,1,2,5,16,63,318,2045,16999,183231,2567284,46749427,
N\ A000112\ Number\ of\ partially\ ordered\ sets\ ("posets")\ with\ n..
\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,

S\ A000110\ 1,1,2,5,15,52,203,877,4140,21147,115975,678570,4213597,
N\ A000110\ Bell\ or\ exponential\ numbers:\ number\ of\ ways\ to\ partition..

S\ A192128\ 1,1,2,5,15,52,203,877,4140,21147,115975,678570,4213597,
N\ A192128\ Number\ of\ set\ partitions\ of\ {1,\ ...,\ n}\ that\ avoid..
\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

S\ A000670\ 1,1,3,13,75,541,4683,47293,545835,7087261,102247563,
N\ A000670\ Fubini\ numbers:\ number\ of\ preferential\ arrangements\ of..

S\ A034172\ 1,1,3,13,75,541,4683,47293,545835,7087261,102247563,
N\ A034172\ Nearest\ integer\ to\ n!/(2*log(2)^(n+1)).
\f[]
.fi
.PP
Show the sequence, name, comments, and formula fields of the sequence
whose A\-number is A006531:
.IP
.nf
\f[C]
sloane\ \-k\ SNCF\ \-\-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
.PP
\f[C]sloane\f[] normally crops long lines to fit the widths of the
terminal.
If this is unwanted, pipe the output through cat or less:
.IP
.nf
\f[C]
sloane\ \-\-long\ \-\-oeis\ id:A000110\ |\ less\ \-R
\f[]
.fi
.SH KEYS
.PP
These are the keys used by the OEIS (http://oeis.org/eishelp2.html).
.IP
.nf
\f[C]
I\ \ ID\ number

S\ \ 1st\ line\ of\ unsigned\ sequence
T\ \ 2nd\ line\ of\ unsigned\ sequence
U\ \ 3rd\ line\ of\ unsigned\ sequence

V\ \ 1st\ line\ of\ signed\ sequence
W\ \ 2nd\ line\ of\ signed\ sequence
X\ \ 3rd\ line\ of\ signed\ sequence

N\ \ Name
C\ \ Comments
D\ \ References
H\ \ Links
F\ \ Formula
e\ \ Examples

p\ \ Maple\ program
t\ \ Mathematica\ program
o\ \ Program\ in\ other\ language

Y\ \ Cross\-references
K\ \ Keywords
O\ \ Offset
A\ \ Author
E\ \ Extensions\ and\ errors
\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>