12 Apr 2021 17:47:59 UTC
- Distribution: OEIS
- Module version: 2021041201
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone git repository
- Testers (16 / 4 / 199)
- KwaliteeBus factor: 1
- License: mit
- Perl: v5.32.0
- Activity24 month
- Download (6.42KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionABIGAIL Abigailand 1 contributors
OEIS - Fetch values from sequences of the OEIS.
use OEIS; my @list = oeis (45, 10);
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.
OEISmodule 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
Bfollowed 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.
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.
The current sources of this module are found on github, git://github.com/Abigail/OEIS.git.
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.
To install this module, run, after unpacking the tar-ball, the following commands:
perl Makefile.PL make make test make install