I suppose it's worth asking whether the original poster wanted a sequence that

contained all the prime numbers, or a sequence that consisted entirely of prime

numbers but doesn't necessarily contain all of them.

"Hadley, Thomas H (Tom), ALABS" wrote:

>

> -----Original Message-----

> From: H.BARGHOUT [mailto:hamedbar@...]

> Sent: Wednesday, March 10, 2004 8:07 AM

> To: primenumbers@yahoogroups.com

> Subject: [PrimeNumbers] SEARCHING FOR A GOOD ALTERNATIVE

>

> Hi all

> i would like to ask if any body has a way to generate

> a sequence of numbers that containes all prime, faster

> than generating all odd number

> thank you in advance

>

> -----End Original Message-----

> Here are two algorithms to generate a sequence of numbers

> that contains all the primes. (both are wheel generators)

>

> print 2

> print 3

> n=5

> for( ever )

> print n

> n = n+2

> print n

> n = n+4

> end for

>

> Or with a bigger wheel:

> print 2

> print 3

> print 5

> n=7

> for( ever )

> print n

> n = n+4

> print n

> n = n+2

> print n

> n = n+4

> print n

> n = n+2

> print n

> n = n+4

> print n

> n = n+6

> print n

> n = n+2

> print n

> n = n+6

> end for

>

> Unsubscribe by an email to: primenumbers-unsubscribe@yahoogroups.com

> The Prime Pages : http://www.primepages.org/

>

>

> Yahoo! Groups Links

>

>

>

>

-- Dan Morenus (

dmorenus@...)

-- This parachute is not warranted to be suitable --

-- for any purpose, including descending safely --

-- from an airplane to the ground. --