NAME

OEIS - Fetch values from sequences of the OEIS.

SYNOPSIS

use OEIS; my @list = oeis (45, 10);

DESCRIPTION

Getting tired of all those challenges asking for the first N values of an OEIS sequence. There isn't much to do in such a case then just fetch the numbers from the OEIS.

The OEIS module exports a single function, oeis, which takes two arguments:

Sequence Number

The first argument is the sequence number. This can either be the full sequence number (an A or B followed by 6 digits), or just a number. In the latter case, the number is padded with zeros to make it 6 digits long, and an A is prepended.

Amount

The second, optional, argument indicates how many numbers of the sequence we want to return. If not given, the method just returns all the integers listed at the OEIS for the sequence; otherwise, it will be capped by the given amount.

For a very few sequences, if the number of listed integes is less than the given amount, the rest will be calculated.

BUGS

TODO

SEE ALSO

The Online Encyclopedia of Integer Sequences

DEVELOPMENT

The current sources of this module are found on github, git://github.com/Abigail/OEIS.git.

AUTHOR

Abigail, mailto:cpan-oeis@abigail.freedom.nl.

COPYRIGHT and LICENSE

Copyright (C) 2021 by Abigail.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

INSTALLATION

To install this module, run, after unpacking the tar-ball, the following commands:

perl Makefile.PL
make
make test
make install