An open API service indexing awesome lists of open source software.

https://github.com/bh2smith/numbertheorypython

Includes; Sieve of Eratosthenes, Euler-Phi, etc...
https://github.com/bh2smith/numbertheorypython

Last synced: 3 days ago
JSON representation

Includes; Sieve of Eratosthenes, Euler-Phi, etc...

Awesome Lists containing this project

README

          

# Number Theory in Python!

This python file includes

Classes:
- Sieve of Eratosthenes (up to $10^6$)

Functions:
- largestPrimeFactor
- factors
- numberOfFactors
- properDivisors
- sumDivisors
- eulerPhi
- order (of an integer modulo n)
- inverse (modulo n)
- lcm and gcd (lowest and greatest common divisors)
- egcd (similar to gcd but actually perfroms the Euclidean algorithm and returns all information)
- nCk (For binomial coefficients -- this is not an efficent algorithm)