From: MichaelW on
On Feb 5, 2:55 pm, JSH <jst...(a)gmail.com> wrote:
> On Feb 4, 5:25 pm, Rick Decker <rdec...(a)hamilton.edu> wrote:
>
>
>
> > Arturo Magidin wrote:
> > > On Feb 4, 2:01 pm, marcus_b <marcus_bruck...(a)yahoo.com> wrote:
>
> > >>   Notice that no one here is saying you are wrong.  Your
> > >> statement is imprecise - it is really about asymptotic
> > >> frequencies of residues - but it looks to me like it has
> > >> a good chance of being true, and I don't think anyone has
> > >> proved it, even for a small prime like 3.  I think it would be a
> > >> valuable theorem if it is true.
>
> > > There is the quantitative form of Dirichlet's Theorem, and
> > > Chebotarev's Density Theorem. If N>=2 and gcd(a,N)=1, then the density
> > > of primes congruent to a modulo N is asymptotic to phi(N), where phi
> > > is Euler's totient function. This follows from Chebotarev (as someone
> > > pointed out ot me recently) by looking at the cyclotomic extension
> > > modulo N.
>
> > > For N=3, it says that asymptotically, "half" the primes are congruent
> > > to 1 mod 3, and half are congruent to 2 mod 3. For N=4, "half" are
> > > congruent to 1 mod 4, half are congruent to 3 mod 4. (But on that
> > > note, as I mentioned recently as well, there are certain measures by
> > > which it makes sense that there are "usually" far more primes
> > > congruent to one of the two classes, can't remember which, in the
> > > sense that if you consider the x for which the race up to x is lead by
> > > those congruent to 1 mod 4, then a certain density measure for those x
> > > gives you a deviation from 0.5).
>
> > And it is just this race behavior that messes up what we might call
> > the Harris function:
>
> >     H(q) = product(1 - 1/(p-1), p prime, 2 < p < \sqrt(q+2))
>
> > which he erroneously claims is the probability that q + 2 will be a
> > prime, given that q is.
>
> > He's done some examples of this, computing the predicted and actual
> > number of twin primes in the interval (p_i)^2 ... (p_{i+1})^2 but as
> > often happens, James falls into the fallacy of the Law of Small Numbers..
> > For example, when we take the two consecutive primes 5471 and 5523
> > we find that there are 33282 primes in the interval 5471^2 .. 5523^2
> > and of these 2605 are twin primes. However, James' result would predict
> > that H(p) = 0.043.. where p is the largest prime smaller than 54721
> > so he would predict that there would be 0.043 * 33282 = 1433 (approx)
> > twin primes, a relative error of almost 82%.
>
> So?  What's the probability of that event?
>
> The expectation for 10 coin flips is 5 heads and 5 evens.
>
> Giving a case of 10 heads does not change that.
>
> Your post intrigues me.  It almost spits in the face of the readership
> of sci.math as if none of them know probability.
>
> It's like a slap in the face of the entire newsgroup.
>
> An expression of contempt for their basic intelligence.
>
> James Harris

Everyone's sample set is suspect here so the obvious thing is run the
it against a very large range of primes. Here's the result



100000th prime is 1299709. Twin count is 10250. Prediction is
11459. Ratio is 1.118. Current prob is 0.105

200000th prime is 2750159. Twin count is 19461. Prediction is
21654. Ratio is 1.112. Current prob is 0.1

300000th prime is 4256233. Twin count is 28349. Prediction is
31470. Ratio is 1.11. Current prob is 0.097

400000th prime is 5800079. Twin count is 36826. Prediction is
41058. Ratio is 1.115. Current prob is 0.095

500000th prime is 7368787. Twin count is 45204. Prediction is
50483. Ratio is 1.117. Current prob is 0.093

600000th prime is 8960453. Twin count is 53661. Prediction is
59774. Ratio is 1.114. Current prob is 0.092

700000th prime is 10570841. Twin count is 61885. Prediction is
68970. Ratio is 1.114. Current prob is 0.092

800000th prime is 12195257. Twin count is 69967. Prediction is
78082. Ratio is 1.116. Current prob is 0.091

900000th prime is 13834103. Twin count is 77975. Prediction is
87116. Ratio is 1.117. Current prob is 0.09

1000000th prime is 15485863. Twin count is 86027. Prediction is
96084. Ratio is 1.117. Current prob is 0.089

1100000th prime is 17144489. Twin count is 93998. Prediction is
104993. Ratio is 1.117. Current prob is 0.089

1200000th prime is 18815231. Twin count is 101932. Prediction is
113851. Ratio is 1.117. Current prob is 0.088

1300000th prime is 20495843. Twin count is 109744. Prediction is
122664. Ratio is 1.118. Current prob is 0.088

1400000th prime is 22182343. Twin count is 117522. Prediction is
131435. Ratio is 1.118. Current prob is 0.088

1500000th prime is 23879519. Twin count is 125358. Prediction is
140168. Ratio is 1.118. Current prob is 0.087

1600000th prime is 25582153. Twin count is 133103. Prediction is
148865. Ratio is 1.118. Current prob is 0.087

1700000th prime is 27290279. Twin count is 140815. Prediction is
157527. Ratio is 1.119. Current prob is 0.086

1800000th prime is 29005541. Twin count is 148474. Prediction is
166161. Ratio is 1.119. Current prob is 0.086

1900000th prime is 30723761. Twin count is 156143. Prediction is
174765. Ratio is 1.119. Current prob is 0.086

2000000th prime is 32452843. Twin count is 163766. Prediction is
183339. Ratio is 1.119. Current prob is 0.086



So for example the millionth prime is 15,485,863, there are 86,027
twin primes up to that number, the James function predicts 96,084 and
the probability function is running at about 0.089. Note that of
course higher precision is used in the code.



Basically the code reads in a list of primes I pre-generated, counting
twins as I scan the list. In addition I track the square root and when
this passes a prime (eg from 47 to 53 the square root passes the prime
7) then I update the probability. The prediction is incremented by the
probability once for each prime. Tests against smaller samples such as
in the original post were used to verify the code.



As you can see the ratio of the prediction to the actual value stays
pretty close to about 1.12. This matches other samples that I and
others have done that typically come in slightly over the actual
value. Presumably heading out to infinity the ratio would either
increase forever or stay below some maximum.



Hope this helps. Regards, Michael W.
From: David Bernier on
Rick Decker wrote:
> Arturo Magidin wrote:
>> On Feb 4, 2:01 pm, marcus_b <marcus_bruck...(a)yahoo.com> wrote:
>>
>>> Notice that no one here is saying you are wrong. Your
>>> statement is imprecise - it is really about asymptotic
>>> frequencies of residues - but it looks to me like it has
>>> a good chance of being true, and I don't think anyone has
>>> proved it, even for a small prime like 3. I think it would be a
>>> valuable theorem if it is true.
>>
>> There is the quantitative form of Dirichlet's Theorem, and
>> Chebotarev's Density Theorem. If N>=2 and gcd(a,N)=1, then the density
>> of primes congruent to a modulo N is asymptotic to phi(N), where phi
>> is Euler's totient function. This follows from Chebotarev (as someone
>> pointed out ot me recently) by looking at the cyclotomic extension
>> modulo N.
>>
>> For N=3, it says that asymptotically, "half" the primes are congruent
>> to 1 mod 3, and half are congruent to 2 mod 3. For N=4, "half" are
>> congruent to 1 mod 4, half are congruent to 3 mod 4. (But on that
>> note, as I mentioned recently as well, there are certain measures by
>> which it makes sense that there are "usually" far more primes
>> congruent to one of the two classes, can't remember which, in the
>> sense that if you consider the x for which the race up to x is lead by
>> those congruent to 1 mod 4, then a certain density measure for those x
>> gives you a deviation from 0.5).
>>
>
> And it is just this race behavior that messes up what we might call
> the Harris function:
>
> H(q) = product(1 - 1/(p-1), p prime, 2 < p < \sqrt(q+2))
>
> which he erroneously claims is the probability that q + 2 will be a
> prime, given that q is.
>
> He's done some examples of this, computing the predicted and actual
> number of twin primes in the interval (p_i)^2 ... (p_{i+1})^2 but as
> often happens, James falls into the fallacy of the Law of Small Numbers.
> For example, when we take the two consecutive primes 5471 and 5523
> we find that there are 33282 primes in the interval 5471^2 .. 5523^2
> and of these 2605 are twin primes. However, James' result would predict
> that H(p) = 0.043.. where p is the largest prime smaller than 54721
> so he would predict that there would be 0.043 * 33282 = 1433 (approx)
> twin primes, a relative error of almost 82%.
>
> While the equidistribution of primes in residue classes mod p is
> indeed an established fact (so no need to make it an axiom), it's an
> asymptotic result and will frequently lead to errors when applied
> to individual cases, as the ones that lead to the what I've generously
> called the Harris function.

Maybe give JSH a month or two to work on it?

David Bernier
From: Arturo Magidin on
On Feb 4, 7:25 pm, Rick Decker <rdec...(a)hamilton.edu> wrote:
> Arturo Magidin wrote:

> > There is the quantitative form of Dirichlet's Theorem, and
> > Chebotarev's Density Theorem. If N>=2 and gcd(a,N)=1, then the density
> > of primes congruent to a modulo N is asymptotic to phi(N), where phi
> > is Euler's totient function. This follows from Chebotarev (as someone
> > pointed out ot me recently) by looking at the cyclotomic extension
> > modulo N.
>
> > For N=3, it says that asymptotically, "half" the primes are congruent
> > to 1 mod 3, and half are congruent to 2 mod 3. For N=4, "half" are
> > congruent to 1 mod 4, half are congruent to 3 mod 4. (But on that
> > note, as I mentioned recently as well, there are certain measures by
> > which it makes sense that there are "usually" far more primes
> > congruent to one of the two classes, can't remember which, in the
> > sense that if you consider the x for which the race up to x is lead by
> > those congruent to 1 mod 4, then a certain density measure for those x
> > gives you a deviation from 0.5).
>
> And it is just this race behavior that messes up what we might call
> the Harris function:
>
>     H(q) = product(1 - 1/(p-1), p prime, 2 < p < \sqrt(q+2))
>
> which he erroneously claims is the probability that q + 2 will be a
> prime, given that q is.
>
> He's done some examples of this, computing the predicted and actual
> number of twin primes in the interval (p_i)^2 ... (p_{i+1})^2 but as
> often happens, James falls into the fallacy of the Law of Small Numbers.
> For example, when we take the two consecutive primes 5471 and 5523
> we find that there are 33282 primes in the interval 5471^2 .. 5523^2
> and of these 2605 are twin primes. However, James' result would predict
> that H(p) = 0.043.. where p is the largest prime smaller than 54721
> so he would predict that there would be 0.043 * 33282 = 1433 (approx)
> twin primes, a relative error of almost 82%.
>
> While the equidistribution of primes in residue classes mod p is
> indeed an established fact (so no need to make it an axiom), it's an
> asymptotic result and will frequently lead to errors when applied
> to individual cases, as the ones that lead to the what I've generously
> called the Harris function.

Yes, but there is more than that. Sarnak and Rubinstein proved in 1995
that if you look at the sum of (1/x) over all the x up to N for which
there are more primes of the form 4n+1 than of the form 4n+3, and then
take the limit of as N--->oo of this sum divided by ln(N), then the
limit exists and is equal to 0.9959.... In a sense, about 99.59% of
the time there are more primes of the form 4n+1 up to x than of the
form 4n+3. (This has to do with the fact that 1 is a square mod 4 and
3 is not, by the way). The set of such X's does not have asymptotic
density (the limit does not exist); and Hardy-Littlewood tells you
that the race will change "leaders" infinitely often. But the
deviations "favor" one of the congruence classes over the other in a
rather striking way.

--
Arturo Magidin
From: David C. Ullrich on
On Thu, 4 Feb 2010 22:10:08 -0800 (PST), Arturo Magidin
<magidin(a)member.ams.org> wrote:

>On Feb 4, 7:25�pm, Rick Decker <rdec...(a)hamilton.edu> wrote:
>> Arturo Magidin wrote:
>
>> > There is the quantitative form of Dirichlet's Theorem, and
>> > Chebotarev's Density Theorem. If N>=2 and gcd(a,N)=1, then the density
>> > of primes congruent to a modulo N is asymptotic to phi(N), where phi
>> > is Euler's totient function. This follows from Chebotarev (as someone
>> > pointed out ot me recently) by looking at the cyclotomic extension
>> > modulo N.
>>
>> > For N=3, it says that asymptotically, "half" the primes are congruent
>> > to 1 mod 3, and half are congruent to 2 mod 3. For N=4, "half" are
>> > congruent to 1 mod 4, half are congruent to 3 mod 4. (But on that
>> > note, as I mentioned recently as well, there are certain measures by
>> > which it makes sense that there are "usually" far more primes
>> > congruent to one of the two classes, can't remember which, in the
>> > sense that if you consider the x for which the race up to x is lead by
>> > those congruent to 1 mod 4, then a certain density measure for those x
>> > gives you a deviation from 0.5).
>>
>> And it is just this race behavior that messes up what we might call
>> the Harris function:
>>
>> � � H(q) = product(1 - 1/(p-1), p prime, 2 < p < \sqrt(q+2))
>>
>> which he erroneously claims is the probability that q + 2 will be a
>> prime, given that q is.
>>
>> He's done some examples of this, computing the predicted and actual
>> number of twin primes in the interval (p_i)^2 ... (p_{i+1})^2 but as
>> often happens, James falls into the fallacy of the Law of Small Numbers.
>> For example, when we take the two consecutive primes 5471 and 5523
>> we find that there are 33282 primes in the interval 5471^2 .. 5523^2
>> and of these 2605 are twin primes. However, James' result would predict
>> that H(p) = 0.043.. where p is the largest prime smaller than 54721
>> so he would predict that there would be 0.043 * 33282 = 1433 (approx)
>> twin primes, a relative error of almost 82%.
>>
>> While the equidistribution of primes in residue classes mod p is
>> indeed an established fact (so no need to make it an axiom), it's an
>> asymptotic result and will frequently lead to errors when applied
>> to individual cases, as the ones that lead to the what I've generously
>> called the Harris function.
>
>Yes, but there is more than that. Sarnak and Rubinstein proved in 1995
>that if you look at the sum of (1/x) over all the x up to N for which
>there are more primes of the form 4n+1 than of the form 4n+3, and then
>take the limit of as N--->oo of this sum divided by ln(N), then the
>limit exists and is equal to 0.9959.... In a sense, about 99.59% of
>the time there are more primes of the form 4n+1 up to x than of the
>form 4n+3. (This has to do with the fact that 1 is a square mod 4 and
>3 is not, by the way). The set of such X's does not have asymptotic
>density (the limit does not exist); and Hardy-Littlewood tells you
>that the race will change "leaders" infinitely often. But the
>deviations "favor" one of the congruence classes over the other in a
>rather striking way.

You guys talking about all these detailed results that you claim
people have actually proved must be lying. How could anyone
possbly have done work in this area before JSH discovered the
whole thing?




From: Rotwang on
On 5 Feb, 05:07, MichaelW <ms...(a)tpg.com.au> wrote:
>
> [a whole load of stuff, then this]
>
> As you can see the ratio of the prediction to the actual value stays
> pretty close to about 1.12.

This number is rather familiar to those of use who were following
James's threads a few years back. See the following article[1], and if
you're after more info then it's worth looking at Tim Peters' posts
from around August 2006, especially those that mention "Mertens".

[1] http://groups.google.co.uk/group/alt.math/msg/95688f21176359b1