Skip to main content
https://raw.githubusercontent.com/Ombucha/python-oeis/main/banner.png PyPI version PyPI downloads Lines of code Repository size

About

python-oeis is a Python library for exploring and retrieving integer sequences from the Online Encyclopedia of Integer Sequences (OEIS). Use it to search for sequences by keywords, fetch classic sequences like the Fibonacci numbers (A000045), primes (A000040), or your favorite obscure sequence, and access OEIS metadata programmatically.

Requirements

Installation

Install the latest stable release from PyPI:

# Unix / macOS
python3 -m pip install "python-oeis"

# Windows
py -m pip install "python-oeis"

To install the development version from GitHub:

git clone https://github.com/Ombucha/python-oeis
cd python-oeis
pip install .

Usage Example

Query the OEIS for sequences, just like searching for A-numbers or keywords on the OEIS website:

import oeis

# Search for sequences related to 'prime numbers'
results = oeis.search('prime numbers')
for seq in results[:3]:
    print(seq.id, seq.name, seq.data[:10])

# Fetch the Fibonacci sequence (A000045)
fib = oeis.Sequence('A000045')
print(fib.name)
print(fib.data[:10])  # First 10 Fibonacci numbers

Metadata

Release files for python-oeis 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-oeis 1.1.1
File Size Uploaded
python_oeis-1.1.1.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-oeis 1.1.1
File Interpreter ABI Platform
python_oeis-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / python_oeis-1.1.1.tar.gz

Download URL python_oeis-1.1.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e27bf800a1da53ef7a54e186b3034d6e37db03ce77a1e333abcb61b8150bf6d7
BLAKE2b-256 checksum
How to use checksums
74112c6e24783a435230383ae0bbfda9ff1682a87a7d0c7fa0f35adb53da6ecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / python_oeis-1.1.1-py3-none-any.whl

Download URL python_oeis-1.1.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
262486f6b42f8fbd0b10fe5a7a118fef4c4930d98c65bafb4dfa375060a01814
BLAKE2b-256 checksum
How to use checksums
68f8fcb2332fe0fad81f852d56e3e5389a6bc097af869a341d437136c106e497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page