News for hackers. Stuff that matters.
Re:A previously unnoticed property of prime numbers by vessenes on Monday March 14, 2016 @12:01PM (#11283595)
Why would you expect 9.1%? At low numbers like these, primes are likely to be closely packed, meaning you are not as likely to have to search forward 11 numbers as just dividing by 11 would imply.
Re:A previously unnoticed property of prime numbers by crnt2 on Monday March 14, 2016 @12:37PM (#11283801)
Miscalculation - obviously no primes end in 0 (base 11) so I should have said "10% as you would naively expect".

I take your point about primes being closely packed at low numbers, but I think this is a small correction (i.e. you might expect 8-9% of primes ending in 2 to be followed by another prime ending in 2, but certainly not <4%)

Re:A previously unnoticed property of prime numbers by furyofantares on Monday March 14, 2016 @01:02PM (#11283936)
Could you rule out all pairs that are less than 11 apart in order to calculate how large a factor that is?
Re:A previously unnoticed property of prime numbers by crnt2 on Monday March 14, 2016 @01:16PM (#11284024)
I made an attempt to do this elsewhere in the thread, take a look at

https://news.ycombinator.com/threads?id=crnt2

The result - the factor is actually surprisingly large!

Re:A previously unnoticed property of prime numbers by furyofantares on Monday March 14, 2016 @02:25PM (#11284516)
Nice!

I did my own investigation using base 3 and noticed something peculiar.

In the first 100k primes, we go from 1 to 2 29028 times and from 2 to 1 29029 times.

Then I filtered out the twin primes since those are the ones that exploit the fact that the next "possible" prime is one that flips the last digit.

This filtered out 10249 primes going from 2 to 1 (bringing the total below both the number of primes that stay at 2 (21008) and the number of primes that stay at 1 (20932)).

It didn't factor out any primes that go from 1 to 2. Are there no twin primes (p,p') where p%3 == 1 and p'%3 == 2?

edit: Oh hey, this is obvious, if p%3 is 1 then p+2 is divisible by 3. It does mean we don't need to take measurements to know that the result we are investigating cannot possibly account for everything since it isn't a factor at all when going from 1 to 2.

Re:A previously unnoticed property of prime numbers by Bognar on Monday March 14, 2016 @02:35PM (#11284579)
> Are there no twin primes (p,p') where p%3 == 1 and p'%3 == 2?

By definition, no there aren't. Twin primes are a distance of 2 apart, so your mod 3 options are 0 -> 2, 1 -> 0, and 2 -> 1. Anything involving 0 means it's divisible by 3, so your only mod 3 possibility for twin primes is 2 -> 1.

EDIT: Excluding the possibility where 3 mod 3 = 0, of course. This allows a 0 -> 2 transition with (3,5).

Re:A previously unnoticed property of prime numbers by furyofantares on Monday March 14, 2016 @02:39PM (#11284604)
Yeah, I managed to get an edit in just before you replied -- I thought I was missing something obvious but I kept looking for a bug in my code instead of realizing that it's mathematically obvious :)