Ticket #7613 (new task)
twin prime class
|Reported by:||kevin.stueve||Owned by:||was|
|Component:||number theory||Keywords:||twin primes counting, sieving|
|Cc:||was, robertwb, GeorgSWeber, kevin.stueve, rohana, victor, leif||Work issues:|
Twin primes are pairs of primes that differ by 2. Currently the twin prime counting function, which counts the number of twin primes less than a given x, is not implemented in Sage, Mathematica, or other computer algebra systems. Where it is calculated, the method used is mere sieving.
Use the approach of #7013 and #7539 to make a competitive (if not the only available as general purpose software) implementation of the twin prime counting function. It should be at least 1000-10000 times faster than mere sieving.
(possible names are twin_prime_pi and prime_pi2).
Implement next_twin_prime, is_twin_prime, is_chen_prime, is_semi_prime functions
Other types of primes such as cousin primes, prime triplets, and sexy primes could also be considered.
Maybe could also try to compute partial sums of Brun's constant or prime harmonics sums.