Skip to content

bh2smith/NumberTheoryPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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)

About

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

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages