## A sieve for twin primes

Expand Messages
• To sieve for all the twin primes less than 6000, fill an array, J, of size 1000 with the integers 1 to 1000. For k = 1 to 1000 J(k) = 0 next k Then for m = 1
Message 1 of 3 , Dec 30, 2005
To sieve for all the twin primes less than 6000,

fill an array, J, of size 1000 with the integers 1 to 1000.

For k = 1 to 1000
J(k) = 0
next k

Then for m = 1 to 120, and n = m to 120

calculate

d0 = 6 m n - m - n

d1 = 6 m n + m - n

d2 = 6 m n - m + n

d3 = 6 m n + m + n

if d0 is between 1 and 1000, set J(d0) = 0

if d1 is between 1 and 1000, set J(d1) = 0

if d2 is between 1 and 1000, set J(d2) = 0

if d3 is between 1 and 1000, set J(d3) = 0

Then for any positive integer, G, still in the array,

6G-1 and 6G+1 are prime.

Illustration for smaller range.

6 * 1 * 1 - 1 - 1 = 4

1, 2, and 3 are skipped.

so 6 * 1 -1 = 5 and 6 * 1 + 1 = 7 are twin primes.

6*2-1 = 11 and 6*2+1=13 are twin primes

6*3-1 = 17 and 6 * 3 + 1 = 19 are twin primes.

6*1*1+1-1 = 6

5 is skipped.

so 6 * 5 -1 and 6 * 5 + 1 are twin primes.

6 * 1*1 + 1 + 1 = 8

7 is skipped.

6 * 7 -1 = 41 and 6 * 7 + 1 = 43 are twin primes.

etc.

Kermit
kermit@...
• That particular sieve has been around since (at least) January of 2000 when it was posted by Maria Suzuki in the American Mathematical Monthly journal. Which
Message 2 of 3 , Dec 30, 2005
That particular sieve has been around since (at least)
January of 2000 when it was posted by Maria Suzuki in
the American Mathematical Monthly journal.

Which types of primes do you get when you replace the
6 with other numbers? E.g., 4mn +/- m +/- n. Can
other prime sieves be written in this (or a similar)
form successfully?

Joseph.

--- Kermit Rose <kermit@...> wrote:

> To sieve for all the twin primes less than 6000,
>
> fill an array, J, of size 1000 with the integers 1
> to 1000.
>
>
> For k = 1 to 1000
> J(k) = 0
> next k
>
>
> Then for m = 1 to 120, and n = m to 120
>
> calculate
>
> d0 = 6 m n - m - n
>
> d1 = 6 m n + m - n
>
> d2 = 6 m n - m + n
>
> d3 = 6 m n + m + n
>
>
> if d0 is between 1 and 1000, set J(d0) = 0
>
> if d1 is between 1 and 1000, set J(d1) = 0
>
> if d2 is between 1 and 1000, set J(d2) = 0
>
> if d3 is between 1 and 1000, set J(d3) = 0
>
>
> Then for any positive integer, G, still in the
> array,
>
>
> 6G-1 and 6G+1 are prime.
>
>
> Illustration for smaller range.
>
>
> 6 * 1 * 1 - 1 - 1 = 4
>
> 1, 2, and 3 are skipped.
>
> so 6 * 1 -1 = 5 and 6 * 1 + 1 = 7 are twin primes.
>
> 6*2-1 = 11 and 6*2+1=13 are twin primes
>
> 6*3-1 = 17 and 6 * 3 + 1 = 19 are twin primes.
>
>
> 6*1*1+1-1 = 6
>
> 5 is skipped.
>
>
> so 6 * 5 -1 and 6 * 5 + 1 are twin primes.
>
>
> 6 * 1*1 + 1 + 1 = 8
>
> 7 is skipped.
>
> 6 * 7 -1 = 41 and 6 * 7 + 1 = 43 are twin primes.
>
>
> etc.
>
>
>
> Kermit
> kermit@...
>
>

__________________________________
Yahoo! for Good - Make a difference this year.
http://brand.yahoo.com/cybergivingweek2005/
• From: Joseph Moore Date: 12/30/05 14:51:01 To: Kermit Rose; primenumbers@yahoogroups.com Subject: Re: [PrimeNumbers] A sieve for twin primes That particular
Message 3 of 3 , Jan 2, 2006
From: Joseph Moore
Date: 12/30/05 14:51:01
Subject: Re: [PrimeNumbers] A sieve for twin primes

That particular sieve has been around since (at least)
January of 2000 when it was posted by Maria Suzuki in
the American Mathematical Monthly journal.

Which types of primes do you get when you replace the
6 with other numbers? E.g., 4mn +/- m +/- n. Can
other prime sieves be written in this (or a similar)
form successfully?

Joseph.

*****************

From Kermit Rose
kermit@...

4 m n + m + n and

4 m n - m - n

sieves out all numbers which generate 4 D + 1.

4 m n + m - n
and
4 m n - m + n

sieves out all numbers which generate 4 D - 1.

In general

A m n + m + n and

A m n - m - n

sieves out all numbers which generate 4 D + 1.

[Non-text portions of this message have been removed]
Your message has been successfully submitted and would be delivered to recipients shortly.