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
Python 3.8 or higher
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
Links
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)
| File | Size | Uploaded | |
|---|---|---|---|
| python_oeis-1.1.1.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|