# some properties of consecutive primes [closed]

If $p_1$ and $p_2$ are two odd consecutive primes and n is their midpoint, then $p_1p_2$ is the largest odd multiple of $p_1$ not exceeding $n^2$. This sounds obvious, but I still have problem to prove it.

• What is the "midpoint"? Their average, $\tfrac{p_1+p_2}2$? – vrugtehagel May 14 '17 at 18:39
• yes it is the average. – Grandma May 14 '17 at 18:42
• What we have to prove is that (1): $\ p_1p_2\le n^2$ (which follows from geometric and arithmetic means), and that (2): $\ p_1(p_2+2)> n^2$, where $n=\frac{p_1+p_2}2$, i.e. that $$4p_1(p_2+2)\ > \ (p_1+p_2)^2$$ which is equivalent to $8p_1>(p_2-p_1)^2$. – Berci May 14 '17 at 19:02
• The first point (1) is straightforward. What we need to prove is a more general aspect of (2): We need to show that $p_1(p_2+2a) > n^2$ for any positive odd integer $a$. – Grandma May 14 '17 at 19:07

Continuing Peter's comment, Andrica's conjecture also states that $$p_{n+1}-p_n=\left(\sqrt{p_{n+1}}-\sqrt{p_n}\right)\left(\sqrt{p_{n+1}}+\sqrt{p_n}\right)<\sqrt{p_{n+1}}+\sqrt{p_n}<2\sqrt{p_n}+1$$ which is better than $$p_{n+1}-p_n<2\sqrt{2p_n}$$ More than that, it is easy to prove a particular case of Andrica's conjecture, if there are no perfect squares between $p_n$ and $p_{n+1}$ then $\sqrt{p_{n+1}}-\sqrt{p_{n}}<1$ $$k^2<p_n<p_{n+1}<(k+1)^2 \Rightarrow k<\sqrt{p_n}<\sqrt{p_{n+1}}<k+1$$ and the result follows. For example $(2,3)$, $(5,7)$, $(11,13)$, $(17,19)$, $(19,23)$ ...

Additionally, "on average", Andrica's conjecture is true: $$\frac{1}{n}\sum_{i=1}^{n}\left(\sqrt{p_{i+1}}-\sqrt{p_{i}}\right)=\frac{1}{n}\left(\sqrt{p_{n+1}}-\sqrt{p_{1}}\right)<\frac{p_{n+1}}{n\ln{n}}\cdot \frac{\ln{n}}{\sqrt{p_{n+1}}}\rightarrow 0, n \rightarrow \infty$$ this follows from Rosser's theorem.

From Vallée-Poussin $$\pi(x)>\frac{x}{\ln{x}}>\sqrt{x}$$ from some $x$. But $$\lim_{x\rightarrow \infty} \frac{\sqrt{x}}{\ln{x}}=\infty \Rightarrow \pi(x)>\frac{x}{\ln{x}}>4\sqrt{x} \tag{1}$$ from some $x$. The number of perfect squares in $\{1,2,..,n\}$ is $\approx \sqrt{n}$, the number of primes in that interval is $\pi(n)$, the number of primes containing a perfect square in between is $\approx 2\sqrt{n}$ (this may contain duplicates, but we approximate) and approximately (from $(1)$) $$\pi(n)-2\sqrt{n}>2\sqrt{n}$$ from some $n$. This means that, within $\{1,2,..,n\}$, the number of primes without a perfect square in between is larger than those with a perfect square in between.

A very complicated problem remains, to prove the result for the pairs of primes having a perfect square in between, which is (sarcastically) a "smaller" subset ...

We have

$$pq \le \left(\frac{p+q}{2}\right)^2$$

if and only if

$$4pq \le p^2+2pq+q^2$$

if and only if

$$0\le (p-q)^2$$

so $pq$ does not exceed $n^2$ (This property is even true for all pairs of real numbers)

We have

$$\left(\frac{p+q}{2}\right)^2\le p(q+2)$$

if and only if

$$p^2+2pq+q^2\le 4pq+8p$$

if and only if

$$(p-q)^2\le 8p$$

So, if the prime gap does not exceed $\sqrt{8p}$ , your claim is true. This is the case for the primes $3\le p\le 10^8$ , so your claim is likely to be true for all primes $p$.

If we could show $q-p\le \sqrt{8p}$ for every odd prime , where $q$ is the prime following after $p$, then we would be done. If the Legendre-conjecture is true (between $n$ and $(n+1)^2$ is always a prime) , then what we need is likely to be true as well.

• Yes Peter I know that the statement is true. My problem is to prove it for all primes. – Grandma May 14 '17 at 19:15
• This would probably require to prove Legendres conjecture, so there is not much hope. – Peter May 14 '17 at 19:19
• You are very close Peter,. A proof of this statement implies that there is a prime between $n$ and $n+\sqrt{2}\sqrt{n-1}$. – Grandma May 14 '17 at 19:23