# Prime Numbers and Lucky Primes

I’ve always loved prime numbers, especially lucky primes. One of the coping mechanisms I frequently use to deal with anxiety is to generate lists of prime numbers in my head.

The sieve of Eratosthenes is the most effective way to generate a list of prime numbers (for values below 10,000 or so, anyway). To use this method:

- Create a list of consecutive integers.
- Let
*p=2*initially. 2 is the first prime number (1 doesn’t count). - Starting from
*p*, count up in increments of*p*and cross out those numbers. - Find the next highest number in the list not previously crossed off, and count up by multiples of that number, crossing off each as you come to it.
- Repeat step 4 until there are no more numbers to cross off.
- The remaining numbers are prime.

Here’s an animation (courtesy wikipedia) that demonstrates this process:

There is also a set…

View original post 149 more words

Advertisements

Posted on October 13, 2013, in Uncategorized. Bookmark the permalink. Leave a comment.

## Leave a comment

## Comments 0