Register to reply

Twin primes and others

by Bob3141592
Tags: primes, twin
Share this thread:
Bob3141592
#1
Jul10-14, 07:32 PM
P: 226
As a programming exercise I wrote a program to generate primes. First I generated a billion of them (the one billionth prime is 22,801,763,489). My program also scans through these numbers for Twin primes (adjacent primes that differ by two), cousin primes (adjacent primes that differ by four) and sexy primes (primes that differ by six and don't have to be adjacent). There are 58,047,180 twin primes among the first billion, and 58,040,263 cousin primes in that same range. Almost the same number. I supposed that that count would hold no matter what the difference between the primes was, so I was surprised to see 116,076,313 sexy primes, almost exactly twice the previous counts. I extended the program to look for other differences, and found 58,044,163 primes that differ by 8, very similar to the count of twins and cousins. But then there were 77,387,551 primes that differ by 10, and 116,089,533 primes that differ by 12, very similar to the sexy count.

I'll be looking for primes with other differences, but the program takes its time.

Is there a reason for this behavior, or is it just statistical variations?
Phys.Org News Partner Mathematics news on Phys.org
'Moral victories' might spare you from losing again
Fair cake cutting gets its own algorithm
Effort to model Facebook yields key to famous math problem (and a prize)
micromass
#2
Jul10-14, 07:42 PM
Mentor
micromass's Avatar
P: 18,071
Quote Quote by Bob3141592 View Post
There are 58,047,180 twin primes among the first billion, and 58,040,263 cousin primes in that same range.
This is already a known conjecture. But it has not yet been proven that it always holds. It follows from the first Hardy-Littlewood conjecture: http://mathworld.wolfram.com/k-TupleConjecture.html
The rest of your numbers also follow from it.
HallsofIvy
#3
Jul10-14, 08:08 PM
Math
Emeritus
Sci Advisor
Thanks
PF Gold
P: 39,353
Quote Quote by Bob3141592 View Post
As a programming exercise I wrote a program to generate primes. First I generated a billion of them (the one billionth prime is 22,801,763,489). My program also scans through these numbers for Twin primes (adjacent primes that differ by two), cousin primes (adjacent primes that differ by four) and sexy primes (primes that differ by six and don't have to be adjacent). There are 58,047,180 twin primes among the first billion, and 58,040,263 cousin primes in that same range. Almost the same number. I supposed that that count would hold no matter what the difference between the primes was
Why would you suppose that? It would seem reasonable to me that, since the larger [itex]x_1[/itex] is the more primes there are to be divisors of numbers, the larger [itex]x_1[/itex] is, the fewer primes there would be between [itex]x_1[/itex] and [itex]x_2[/itex] for a fixed [itex]x_2- x_1[/itex].

, so I was surprised to see 116,076,313 sexy primes, almost exactly twice the previous counts. I extended the program to look for other differences, and found 58,044,163 primes that differ by 8, very similar to the count of twins and cousins. But then there were 77,387,551 primes that differ by 10, and 116,089,533 primes that differ by 12, very similar to the sexy count.

I'll be looking for primes with other differences, but the program takes its time.

Is there a reason for this behavior, or is it just statistical variations?


Register to reply

Related Discussions
Pairs of twin primes Linear & Abstract Algebra 8
Twin Primes of the form (8n+5,8n+7) Linear & Abstract Algebra 11
Twin Primes Linear & Abstract Algebra 3
Large Twin Primes General Math 7
Is the number of twin primes really infinite? Linear & Abstract Algebra 6