For $n \ge 20$, there are at least $0.6 \cdot \frac{2^n}{n}$ primes in $\left[2^{n-1},2^n - 1\right]$.

153 Views Asked by At

From the prime number theorem, one can deduce the following inequality:

For $x \ge 355991$, if $\pi(x) = \left|\{p \le x:p \text{ is prime}\}\right|$ then we have $$\frac{x}{\ln(x)}\left(1+\frac{1}{\ln(x)}\right) < \pi(x) < \frac{x}{\ln(x)}\left(1+\frac{1}{\ln(x)}+\frac{2.51}{(\ln(x))^2}\right)$$

Form here I have to deduce that for $n \ge 20$ one has that there are at least $0.6 \cdot \frac{2^n}{n}$ primes in $\left[2^{n-1},2^n - 1\right]$.

My try

Observation: $\pi(2^n -1) = \pi(2^n)$ since $2^n$ is not prime.

So the number of primes in $\left[2^{n-1},2^n - 1\right]$ is given by $\pi\left(2^n\right)-\pi\left(2^{n-1}\right)$.

We have:

$$\pi\left(2^{n-1}\right) <\frac{2^{n-1}}{\ln\left(2^{n-1}\right)}\left(1+\frac{1}{\ln\left(2^{n-1}\right)}+\frac{2.51}{\left(\ln\left(2^{n-1}\right)\right)^2}\right) \implies \\ -\frac{2^{n-1}}{\ln\left(2^{n-1}\right)}\left(1+\frac{1}{\ln\left(2^{n-1}\right)}+\frac{2.51}{\left(\ln\left(2^{n-1}\right)\right)^2}\right) < -\pi\left(2^{n-1}\right) $$

$$\frac{2^n}{\ln\left(2^n\right)}\left(1+\frac{1}{\ln\left(2^n\right)}\right) < \pi\left(2^n\right)$$

adding up these two:

$$\frac{2^n}{\ln\left(2^n\right)}\left(1+\frac{1}{\ln\left(2^n\right)}\right) - \frac{2^{n-1}}{\ln\left(2^{n-1}\right)}\left(1+\frac{1}{\ln\left(2^{n-1}\right)}+\frac{2.51}{\left(\ln\left(2^{n-1}\right)\right)^2}\right) < \pi\left(2^n\right) - \pi\left(2^{n-1}\right)$$

At this point I could do various simplifications but I cannot find the right approximation. Any ideas?

Related:

How many all prime numbers p with length of bits of p = 1024 bits?

Other sources:

This slides provide a rough estimation.

Here there seems to be an accurate deduction referenced (see section 4)

In particular, they refer to corollary 3 in this paper which reads:

For $x \ge 20.5$, $$\frac{3 \cdot x}{5 \cdot \log(x)} < \pi(2x) - \pi(x)$$

I would still thank he person with the patience to put everything together and give a well-reasoned answer.

1

There are 1 best solutions below

1
On BEST ANSWER

You almost did it: $$\frac{2^n}{\ln\left(2^n\right)}\left(1+\frac{1}{\ln\left(2^n\right)}\right) - \frac{2^{n-1}}{\ln\left(2^{n-1}\right)}\left(1+\frac{1}{\ln\left(2^{n-1}\right)}+\frac{2.51}{\left(\ln\left(2^{n-1}\right)\right)^2}\right)=\\ \frac{2^n}{n}\left(\color{red}{\frac{1}{\ln2}}+ \color{blue}{\frac{1}{n(\ln2)^2}}-\color{red}{\frac{n}{2(n-1)\ln{2}}}- \color{blue}{\frac{n}{2(n-1)^2(\ln{2})^2}}- \frac{n\cdot2.51}{2(n-1)^3(\ln{2})^3}\right)=\\ \frac{2^n}{n}\left(\color{red}{\frac{n-2}{(n-1)\ln{4}}}+ \color{blue}{\frac{n^2-4n+2}{2(n-1)^2 n(\ln{2})^2}}- \frac{n\cdot2.51}{2(n-1)^3(\ln{2})^3}\right)=\\ \frac{2^n}{n}\cdot\frac{1}{\ln{4}}\left(\left(1-\frac{1}{n-1}\right)+ \frac{1}{n\ln{2}}\left(1-\frac{2n-1}{(n-1)^2}\right)- \frac{n\cdot 2.51}{(n-1)^3(\ln{2})^2}\right)>...$$ Now, it is not too difficult (checking 1st derivative and monotonicity) to show that $$1-\frac{2n-1}{(n-1)^2}>\frac{1}{2}, \forall n\geq6$$ and $$-\frac{n^2\cdot 2.51}{(n-1)^3(\ln{2})^2} > -\frac{1}{2}, \forall n\geq14$$ thus $$...>\frac{2^n}{n}\cdot\frac{1}{\ln{4}}\left(\left(1-\frac{1}{n-1}\right)+ \frac{1}{2n\ln{2}}-\frac{1}{2n}\right)=\\ \frac{2^n}{n}\cdot\frac{1}{\ln{4}}\left(\left(1-\frac{1}{n-1}\right)+ \frac{1}{2n}\left(\frac{1}{\ln{2}}-1\right)\right)>\\ \frac{2^n}{n}\cdot\frac{1}{\ln{4}}\left(1-\frac{1}{n-1}+ \frac{0.4426}{2n}\right) > ...$$ and again, checking 1st derivative and monotonicity we have $$\frac{1}{\ln{4}}\left(1-\frac{1}{n-1}+ \frac{0.4426}{2n}\right)>0.6, \forall n\geq6$$ thus, finally $$...> 0.6 \frac{2^n}{n}$$

It is also worth mentioning this paper, Ramanujan's proof of Bertrand’s postulate.