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 python Copy Edit 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.2.tar.gz (3.6 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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythagix-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 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.2.tar.gz
Algorithm Hash digest
SHA256 c6d83a40d66d7e8d844cee748f0d4604a2af328531167145041b73b70ab4bf11
MD5 e2c14912ccf98253bf97b44e3e4e6a6a
BLAKE2b-256 e1024863d728119cb5b4309b7f88257499f4acf5836fcd62f9a634306a612a51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythagix-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d8e2dac92f430da159f3343f47c443e97d93b8ecd2bc6419dfba7a4d98891c2
MD5 734e4703ad8cbff559fe66345dfe26c0
BLAKE2b-256 5e7d38b2ab34b1a3208f110905bc8443e3c0c2200236d972b612042a8536de46

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