Robert wrote:

> Primes/Expected primes/% over expected

> 196 146.5624722 33.73%

> I summed individual 1/logx for each x,

> where x is the sum of 3 consecutive primes.

You must have used base 10 log. It should be natural log and

give expected primes = 63.65 = 146.56/log 10.

(Incidentally, log 10 = 2.3026 is close to Phil's below

limit but that is purely a coincidence).

Phil Carmody wrote:

> Hypothesis - for each prime p there's a ((p-1)^3+1)/(p-1)^3 density boost.

>

> Limit ~= 2.30

I agree with this formula and limit.

> 2.6383761

>

> The ratio seems to be dropping (I also checked to 10^7), but not at a

> rate where I'd feel convinced it would eventually reach 2.30.

>

> I was genuinely expecting something closer to 2.30.

> It's odd for me to be 15% out when it comes to density heuristics.

> Can Jack/Decio/Jens/Paul/Chris/David/... spot any obvious error?

Not obvious. Experimentation indicates the 15% is mainly

caused by the factor 3.

I computed how often the sum of 3 consecutive prp's was not divisible

by 3 in the first 10000 cases after 10^d, for d = 0, 5, 10, ..., 100:

(01:31) gp > forstep(d=0,100,5,N=10^d;s=0;p=nextprime(N);q=nextprime(p+1);

for(i=1,10000,r=nextprime(q+1);if((p+q+r)%3!=0,s++);p=q;q=r);

print(d" "s))

0 8537

5 8416

10 8079

15 7748

20 7727

25 7863

30 7709

35 7615

40 7626

45 7672

50 7646

55 7589

60 7579

65 7540

70 7594

75 7490

80 7727

85 7576

90 7580

95 7594

100 7504

Let's call d=80 a random fluctuation in a limited data sample.

It looks plausible that the ratio is dropping towards

7500/10000 = 3/4 as Phil expects.

8416/7500 = 1.12 is not that far from Phil's measured 15% error

for small primes.

And factors above 3 may also have a special effect for small numbers.

I guess this special effect is caused by larger prime gaps "not getting

their chance" to occur when there has already been a prime.

Example: Prime gaps 10 and 20 probably have the same asymptotic frequency,

because they have the same prime factors (*). But 10 is significantly more

common among small numbers because there has more often been a

prime before p+20 is reached.

Maybe a good heuristic for our problem on small numbers would have

to compute an expected probability of every relatively small gap size

(or maybe every combination of 2 consecutive gap sizes) between

primes of the examined size. I haven't done that.

(*) The expected frequency of a prime gap depends on its prime factors.

Example: If p>3 is prime then p+6 never has factor 3. This means gap 6 is

probably twice as common as gap 4 and gap 8.

Heuristic exercise I recently made: What is the smallest even gap divisible by

3 which is probably less common than one of the even neighbours not divisible

by 3?

--

Jens Kruse Andersen