Total Pageviews

Friday, October 15, 2010

Prime Numbers

A number p is prime if it is a positive integer greater than 1 and is divisible by no other positive integers other than 1 and itself.


The list of prime numbers less than 1000 are ;


The simplest method to find the prime numbers was developed by Eratosthenes in the 3rd century B.C. Here's how it works: Suppose we want to find all the prime numbers between 1 and 64. 
We write out a table of these numbers, and proceed as follows. 
2 is the first integer greater than 1, so it is obviously prime. 
We now cross out all multiples of two. 
The next number that we haven't crossed out is 3. 
We circle it and cross out all its multiples.
The next non-crossed-out number is 5, so we circle it and cross out all its multiples. 
We only have to do this for all numbers less than the square root of our upper limit (in this case sqrt(64)=8) since any composite number in the table must have at least one factor less than the square root of the upper limit. What's left after this process of elimination is all the prime numbers between 1 and 64.















No comments:

Post a Comment