Utility functions for prime numbers
primer_2020 is a prime number library. It provides functions for generating primes and factorization.
$ git clone https://github.com/MartinThoma/primer_2020.git $ cd primer_2020 $ pip install -e .
>>> import primer_2020 >>> primer_2020.factorize(28) >>> [2, 2, 7]
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.