Skip to content
oeistoolsPublic

About

All sequences from The On-Line Encyclopedia of Integer Sequences coded

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

oeis-code

CI codecov PyPI version Python versions Package format License: MIT Docs

Mini OEIS in Python with PARI/GP support.

Installation

pip install oeis-code

PARI/GP Support (Optional)

To use the PARI/GP backend, you need cypari2. Note that this requires PARI/GP development headers installed on your system.

Debian/Ubuntu:

sudo apt install build-essential python3-dev libgmp-dev libpari-dev pari-gp
pip install cypari2

Fedora:

sudo dnf install pari-devel
pip install cypari2

macOS (using Homebrew):

brew install pari
pip install cypari2

Usage

from oeis_code import get

# Get the 10th Fibonacci number
get("A000045", 10)  # Returns 55

Contributing

  • Create a new file in src/oeis_code/sequences/
  • Use the @register("Axxxxxx") decorator
  • Implement the sequence(n) function
  • See CONTRIBUTING.md for full guidance

Releases

See CHANGELOG.md for a full list of changes.

About

All sequences from The On-Line Encyclopedia of Integer Sequences coded

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages