Twin Prime Sieve: Calculate All Twins Less Than N - Todd's Version

  • Thread starter Thread starter toddkuen
  • Start date Start date
  • Tags Tags
    Prime
toddkuen
Messages
15
Reaction score
0
I am interested in twin primes and have not been able to find a simple "sieve" type function to calculate them.

I created my own. You can find it at this URL:

http://www.just-got-lucky.com/math/TwinPrimeSieve_08102010_v01.pdf

It calculates all the twins less than N.

I also wrote a Mathematica version - its listed in the PDF - so you can play with it.

Any links to other twin prime sieves would be helpful.

Thanks
Todd
 
Physics news on Phys.org
How efficient is your sieve? How long does it take to generate the twins up to 10^10, say? (There are 27412679.)

Making a simple Eratosthenes-style sieve for twin primes is straightforward enough, but I wonder if anyone has tried to make a Bernstein-Atkin-style twin sieve. Is such a thing possible?
 
Not very. I am more interested in this concept as opposed to actual use. My interest is in the abstraction of making the twin primes the sieve.

It goes along with the boxed prime idea I posted a while back. I make triples of three odds what is sieved in this case. But you could do it for groups of six as well in which case the 19 and 109 values come out.
 
Back
Top