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.(adsbygoogle = window.adsbygoogle || []).push({});

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?

**Physics Forums - The Fusion of Science and Community**

# Twin primes and others

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Twin primes and others

Loading...

**Physics Forums - The Fusion of Science and Community**