.\" 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\ .PD 0 .P .PD Source code for \f[C]sloane\f[]: .SH AUTHOR .PP Anders Claesson