A Python project for OEIS sequences, analysis, and factoring tools.
src/oeispy: Main package containing sequence implementations and utilities.core.py: Core sequence class.sequences/: Implementations of individual OEIS sequences.utils/: Helper modules (factoring, primes, etc.).
scripts/: Executable scripts for various tasks (e.g., aliquot sequences).data/: Data storage for scripts.
This project uses uv for dependency management and is compatible with NixOS via shell.nix.
- Python 3.8+
uv(Python package manager)- Nix users: Run
nix-shellto load system dependencies (primesieve,gmp,mpfr).
-
Enter the environment (if using Nix):
nix-shell
-
Install the package in editable mode:
uv pip install -e .
You can run scripts using uv run. The scripts are located in the scripts/ directory.
Example: Running the Aliquot script
uv run scripts/aliquot.py --helpExample: Using the library in Python
from oeispy.sequences.A000040 import A000040
seq = A000040()
print(seq(1)) # Output: 2- Adding Dependencies: Update
pyproject.tomland runuv pip install -e .. - New Sequences: Add new sequence files to
src/oeispy/sequences/inheriting fromoeispy.core.Sequence.