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

  • Thread starter toddkuen
  • Start date
  • Tags
    Prime
In summary, the conversation discusses the topic of twin primes and the creation of a sieve function to calculate them. The speaker shares their own version of the sieve and mentions a Mathematica version as well. They also express interest in other twin prime sieves and discuss the efficiency of their own sieve. The conversation concludes with a mention of the abstraction of twin primes as a sieve and the possibility of creating a Bernstein-Atkin-style sieve.
  • #1
toddkuen
15
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
  • #2
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?
 
  • #3
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.
 

1. What is a Twin Prime Sieve?

A Twin Prime Sieve is a mathematical algorithm used to find and calculate twin primes, which are pairs of prime numbers that differ by 2.

2. How does the Twin Prime Sieve work?

The Twin Prime Sieve works by starting with a list of all numbers up to a given limit, and then crossing off any numbers that are not prime. The remaining numbers are then checked to see if they are twin primes.

3. Why is the Twin Prime Sieve important?

The Twin Prime Sieve is important because it helps to identify and understand patterns in prime numbers. Twin primes have been a topic of interest in mathematics for centuries and the Twin Prime Sieve is one tool that can help in their study.

4. What is the difference between Todd's version of the Twin Prime Sieve and other versions?

Todd's version of the Twin Prime Sieve uses a more efficient algorithm for finding twin primes, making it faster and more accurate than other versions.

5. How can the Twin Prime Sieve be used in real life?

The Twin Prime Sieve has applications in cryptography, as twin primes are used in some encryption methods. It also has potential uses in computer science and data analysis, as well as in the study of prime numbers and number theory.

Similar threads

  • Programming and Computer Science
Replies
22
Views
635
  • Linear and Abstract Algebra
Replies
6
Views
3K
  • General Discussion
Replies
4
Views
2K
  • Linear and Abstract Algebra
Replies
14
Views
5K
  • Linear and Abstract Algebra
Replies
1
Views
2K
  • Special and General Relativity
Replies
24
Views
2K
  • Special and General Relativity
4
Replies
115
Views
5K
Replies
1
Views
6K
  • General Math
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
6
Views
3K
Back
Top