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.3.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.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythagix-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d4734feae8730c0921d3b45bec0c021e69bb81912c84ab4801e152bf541b2cfb
MD5 9da86ca83d21ee92544b889f83af1492
BLAKE2b-256 afd36d7e5bfc0630773fcd4eae9d272801b6cf62f0cc294429ee41d1992a2a64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythagix-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1803ad1e58a39de514e05263f33dab880ea1490353316d6b121c73a50068610d
MD5 1813c72a9e6488da07e45b7037c0ea7f
BLAKE2b-256 5dc51e7df200dd309dcff37adcc7586f9657d06915dbed9d0c34e5a4a4ef2d51

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