The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::MathImage::NumSeq::Sequence::OEIS -- sequence of integers by OEIS number

SYNOPSIS

 use App::MathImage;
 my $seq = App::MathImage::NumSeq::Sequence::OEIS->new (oeis_number => 32);
 my ($i, $value) = $seq->next;
 $value = $seq->ith(6);

DESCRIPTION

This module creates a NumSeq for a given OEIS sequence number. If there's a NumSeq module implementing the sequence then that's used, otherwise downloaded OEIS files are read.

OEIS files are sought in an OEIS directory under the user's home directory. It can have a B-file or A-file b000032.txt or a000032.txt, and/or the "internal" format info page A000032.internal.

    ~/OEIS/b000032.txt
    ~/OEIS/a000032.txt
    ~/OEIS/A000032.internal

    downloaded from:
    http://oeis.org/A000032/b000032.txt
    http://oeis.org/A000032/a000032.txt
    http://oeis.org/A000032/internal

There's only a few a.txt files but when available they have lots of values. Not every sequence has a b.txt file and in that case the 30 or 40 sample values from the "internal" page are used. For many sequences this will be no more than a taste, but for fast growing sequences it may be enough.

SEE ALSO

App::MathImage::NumSeq

HOME PAGE

http://user42.tuxfamily.org/math-image/index.html

LICENSE

Copyright 2010, 2011 Kevin Ryde

Math-Image is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Math-Image is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Math-Image. If not, see <http://www.gnu.org/licenses/>.