Prime number module

Miki Tebeka tebeka at cs.bgu.ac.il
Tue Sep 30 07:02:10 EDT 2003


Hello Dag,

> Is there a python module that includes functions for working with prime 
> numbers?  I mainly need A function that returns the Nth prime number and 
> that returns how many prime numbers are less than N, but a prime number 
> tester would also be nice.  I'm dealing with numbers in the 10^6-10^8 range  
> so it would have to fairly efficient
Try gmpy (http://gmpy.sourceforge.net/)

HTH.
Miki




More information about the Python-list mailing list