> > --- In primenumbers@yahoogroups.com, "ianredwood" wrote:

> > >

> > > Whoops - I've got to say that again.

> > > What's the highest known n for which,

> > > for any 7 <= k <= n, pi(k/2) > pi(k) - pi(k/2)?

> > > Is it bigger than 10^(60)?

(...)

> > vector(99,i,(primepi((1+i)\2)*2-primepi(1+i)))

> > = [-1, -2, 0, -1, 1, 0, 0, 0, 2, 1, 1, 0, 2, 2, 2, 1, 1, 0, 0, 0, 2, 1, 1, 1, 3, 3, 3, 2, 2, 1, 1, 1, 3, 3, 3, 2, 4, 4, 4, 3, 3,

> > 2, 2, 2, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 4, 3, 3, 2, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1, 3, 3, 3, 3, 3, 2, 2, 2, 4, 3, 3, 3, 5,

> > 5, 5, 4, 4, 4, 4, 4, 6, 6, 6, 5, 5, 5, 5]

> >

> Many thanks but the 'vector' part is beyond me.

It was mainly meant as illustration...

among others, of the fact that I don't understand your k >= 7 lower limit... Could you first explain that one ?

(From the above, one sees that for example for k=21 (position of the last "0" in the list), one has equality

pi(k/2) = pi(k) - pi(k/2)

i.e. for this k your initial inequality is not satisfied,

and one sees that k=5 is the largest value for which (in the domain calculated above), we have strict inequality in the "wrong" sense,

pi(k/2) < pi(k) - pi(k/2)

So I don't know what the k >= 7 limit comes from.)

> How do you know that the bounds are the ones, 5 and 21,

> that you cite? Can you supply any literary reference?

no, sorry...

Hm, at a second look, it seems to follow from the equations in

http://en.wikipedia.org/wiki/Prime_number_theorem#Bounds_on_the_prime-counting_function
According to that, the function

f:= x -> x/ln(x)*(1+1/ln(x));

is a lower bound, and

g:= x -> x/ln(x)*(1+1/ln(x)+251/100/ln(x)^2);

is an upper bound of pi(x), for x large enough, thus:

D(k) = pi(k/2)*2 - pi(k) > f(k/2)*2 - g(k)

which yields, if my Maple is correct, something equivalent to

D(k) ~ ln(2) * k * ln(k)^2 / ln(k/2)^4.

Can you confirm this calculation ?

Maximilian