1 is not prime (Re: a better prime number generator)
Paul Winkler
slinkp23 at yahoo.com
Wed Oct 24 01:58:27 EDT 2001
More information about the Python-list mailing list
Wed Oct 24 01:58:27 EDT 2001
- Previous message (by thread): Embedding and Extending Issue
- Next message (by thread): 1 is not prime (Re: a better prime number generator)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 24 Oct 2001 13:54:16 +1300, Greg Ewing <greg at cosc.canterbury.ac.nz> wrote: >Paul Winkler wrote: >> >> # 1 is prime, but we don't want it in the list during the loop >> primes.insert(0, 1) >The way the primes are usually defined, 1 is >not considered prime. So this line should be >removed. Oops! Right you are. An interesting text on the subject: http://www.utm.edu/research/primes/notes/faq/one.html You can see how long it's been since I've taken a mathematics course! -- Paul Winkler
- Previous message (by thread): Embedding and Extending Issue
- Next message (by thread): 1 is not prime (Re: a better prime number generator)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list