Skip to main content

A mathy Python package with utilities like LCM, triangle numbers, etc.

Project description

🧠 pythagix

Math utilities for number nerds.
Check primes, compute triangle numbers, find GCDs — all in one lightweight package.
Because math shouldn't be a pain 🧮✨


📦 Installation

pip install pythagix

⚙️ Features

🔢 is_prime(number) — Check if a number is prime

📜 prime_list([list]) — Return all primes in a list

🔎 nth_prime(n) — Get the n-th prime number

🤝 gcd([list]) — Greatest common divisor of a list

📏 is_perfect_square(n) — Check if n is a perfect square

🧱 count_factors(n) — Get all factors of a number

🔺 triangle_number(n) — Get the n-th triangle number

🧪 Examples

from pythagix import is_prime, nth_prime, gcd, triangle_number

print(is_prime(13))        # True
print(nth_prime(10))       # 29
print(gcd([12, 18, 24]))   # 6
print(triangle_number(7))  # 28

📚 Why? pythagix was built to give math students, coders, and tinkerers a fast and fun way to explore number theory in Python. No heavy dependencies. Just pure mathy goodness.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythagix-0.1.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythagix-0.1.4-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file pythagix-0.1.4.tar.gz.

File metadata

  • Download URL: pythagix-0.1.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for pythagix-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b36f5d6f8f7f1865153e9ac5e2ba7c3d98bf1611e128c405a61cde33971f1f27
MD5 72a3b6d6f8809e8a919d87f6df246281
BLAKE2b-256 48f09001168759bb2bbd54d92efaed17450b93f022508faeaeed0b6f87794145

See more details on using hashes here.

File details

Details for the file pythagix-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pythagix-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for pythagix-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c2b3ed7a22f8d15693f1e535d9b834cc512587163e9bbed032cf7a73d8c546aa
MD5 37005c802e7f086ce96755b4b0d8eb94
BLAKE2b-256 88dcc9e0e0ce0bb3c33084cc9e4ddb81feaac22d73344f1f0725d063bd7b3ad4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page