This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ramchandra Apte
Recipients Ramchandra Apte
Date 2011-12-15.03:35:21
SpamBayes Score 3.73144e-06
Marked as misclassified No
Message-id <1323920122.96.0.499037580838.issue13603@psf.upfronthosting.co.za>
In-reply-to
Content
It would be nice to have prime-related and number theory functions in a new module or some existing module (like math).
like this:
>>> import prime
>>> prime.isprime(7)
True
>>> prime.isprime(35)
False
>>> prime.primerange(10,18)
(11,13,17)
>>> prime.isperfect(6) #Is 6 a perfect number (http://en.wikipedia.org/wiki/Perfect_number)
True
>>> prime.factorize(60)
{2:2,3:1,5:1} #2**2 * 3**1 * 5**1
History
Date User Action Args
2011-12-15 03:35:23Ramchandra Aptesetrecipients: + Ramchandra Apte
2011-12-15 03:35:22Ramchandra Aptesetmessageid: <1323920122.96.0.499037580838.issue13603@psf.upfronthosting.co.za>
2011-12-15 03:35:22Ramchandra Aptelinkissue13603 messages
2011-12-15 03:35:21Ramchandra Aptecreate