Do Arithmetic Mean and Geometric Mean of Prime Numbers converge?

7k Views Asked by At

I was looking at a list of primes. I noticed that $ \frac{AM (p_1, p_2, \ldots, p_n)}{p_n}$ seemed to converge.

This led me to try $ \frac{GM (p_1, p_2, \ldots, p_n)}{p_n}$ which also seemed to converge.

I did a quick Excel graph and regression and found the former seemed to converge to $\frac{1}{2}$ and latter to $\frac{1}{e}$. As with anything related to primes, no easy reasoning seemed to point to those results (however, for all natural numbers it was trivial to show that the former asymptotically tended to $\frac{1}{2}$).

Are these observations correct and are there any proofs towards:

$$ { \lim_{n\to\infty} \left( \frac{AM (p_1, p_2, \ldots, p_n)}{p_n} \right) = \frac{1}{2} \tag1 } $$

$$ { \lim_{n\to\infty} \left( \frac{GM (p_1, p_2, \ldots, p_n)}{p_n} \right) = \frac{1}{e} \tag2 } $$

Also, does the limit $$ { \lim_{n\to\infty} \left( \frac{HM (p_1, p_2, \ldots, p_n)}{p_n} \right) \tag3 } $$ exist?

6

There are 6 best solutions below

10
On

Your conjecture for GM was proved in 2011 in the short paper On a limit involving the product of prime numbers by József Sándor and Antoine Verroken.

Abstract. Let $p_k$ denote the $k$th prime number. The aim of this note is to prove that the limit of the sequence $(p_n / \sqrt[n]{p_1 \cdots p_n})$ is $e$.

The authors obtain the result based on the prime number theorem, i.e., $$p_n \approx n \log n \quad \textrm{as} \ n \to \infty$$ as well as an inequality with Chebyshev's function $$\theta(x) = \sum_{p \le x}\log p$$ where $p$ are primes less than $x$.

5
On

We can use the simple version of the prime counting function $$p_n \approx n \log n$$ and plug it into your expressions. For the arithmetic one, this becomes $$\lim_{n \to \infty} \frac {\sum_{i=1}^n p_i}{np_n}=\lim_{n \to \infty} \frac {\sum_{i=1}^n i\log(i)}{np_n}=\lim_{n \to \infty} \frac {\sum_{i=1}^n \log(i^i)}{np_n}\\=\lim_{n \to \infty} \frac {\log\prod_{i=1}^n i^i}{np_n}=\lim_{n \to \infty}\frac {\log(H(n))}{n^2\log(n)}$$ Where $H(n)$ is the hyperfactorial function. We can use the expansion given on the Mathworld page to get $$\log H(n)\approx \log A -\frac {n^2}4+\left(\frac {n(n+1)}2+\frac 1{12}\right)\log (n)$$ and the limit is duly $\frac 12$

I didn't find a nice expression for the product of the primes.

0
On

Not an answer, but an illustration of the type of convergence of (2). I reproduced the formula for the geometrical mean in the version reciprocal to the OP's formula to match the formula of the cited literature. The curve shows the deviation from $e$ and the slowness of convergence.

picture

The red curve is the running mean using 7 data points.

10
On

Here is a general answer to this which will solve the case for AM, GM and HM in one shot.

Observe that since $p_n \sim n\log n$, as $n \to \infty$ the proportion of numbers formed by the sequence of ratios $\frac{p_1}{p_n},\frac{p_2}{p_n} \ldots, \frac{p_{n-1}}{p_n}$ which fall inside any sub-interval within $(0,1)$ is proportion to the length of that interval i.e. the sequence $\frac{p_r}{p_n}$ approaches equidistributed in $(0,1)$ [for the proof of equi/uniform distribution, see the comment below by Mariuslp]. Hence, for an equidistributes sequence, we have:

Theorem: Let $p_k$ be the $k$-th prime and let $f$ be a continuous function Riemann integrable in $(0,1)$ then,

$$ \lim_{n \to \infty}\frac{1}{n}\sum_{r = 1}^{n}f\Big(\frac{p_r}{p_n}\Big) = \int_{0}^{1}f(x)dx. $$

(See the proof in this MO link for a direct proof). Taking $f(x) = x, \log(x)$ and $\frac{1}{x}$ respectively with some manipulations, we get the required limit for AM, GM and HM as $\frac{1}{2},\frac{1}{e}$ and $0$ respectively.

Example: Showing the case for GM due to request in the bellow comments. Let $$ \lim_{n \to \infty}\frac{(p_1 p_2 \ldots p_n)^{1/n}}{p_n} = \lim_{n \to \infty}\Big(\frac{p_1}{p_n}\Big)^{1/n} \Big(\frac{p_2}{p_n}\Big)^{1/n} \ldots \Big(\frac{p_n}{p_n}\Big)^{1/n} = l $$

Clearly, $0 < l < 1$. Taking logarithm on both sides, we have $$ \log l = \lim_{n \to \infty} \frac{1}{n} \sum_{r = 1}^{n}\log \Big(\frac{p_r}{p_n}\Big) = \int_{0}^{1} \log x dx = -1. $$

Hence $l = 1/e$.

2
On

About the harmonic mean: I believe that it exists, but it is zero.

The harmonic mean limit (HML) is $$HML=\lim_{n\rightarrow\infty}\left(\frac{HM(p_1,p_2,\ldots)}{p_n}\right).$$ The harmonic mean itself can be written as $$HM(p_1,p_2,\ldots)=\frac{n}{\sum_{i=1}^{n}\frac{1}{p_i}}.$$ The asymptotic behavior of the sum in the fraction is (see Mathworld): $$\sum_{i=1}^{n}\frac{1}{p_i}=\ln \ln p_n + B_1 + o(1),$$ with $B_1 \approx0.261$ the Mertens constant, so the asymptotic behavior of the harmonic mean is $$HM(p_1,p_2,\ldots)=O\left(\frac{n}{\ln \ln p_n}\right)=o(n).$$

Here, $o(n)$ is the small oh-notation, which means that asymptotically, the left hand term is smaller than $n$.

Using the approximation $p_n\approx n\ln n$, $$HML=\lim_{n\rightarrow\infty}\left(\frac{o(n)}{n\ln n}\right)=\lim_{n\rightarrow\infty}o\left(\frac{1}{\ln n}\right)=0.$$

0
On

This is a lower-tech alternative to Ross Millikan's answer for the Arithmetic Mean result (not using the hyperactive factorial function...), followed by a proof for the Geometric Mean (which occurred to me later).

Using $p_n\approx n\log n$ for large $n$, we need to prove

$${1\over n^2}\sum_{k=1}^n{k\log k\over\log n}\to{1\over2}$$

But for any $0\lt r\lt1$ we have

$$(1-r)\sum_{k=\lceil n^{1-r}\rceil}^nk\le\sum_{k=1}^n{k\log k\over\log n}\le\sum_{k=1}^nk={n(n+1)\over2}$$

(Note, the lower limit on the lower bounding sum is $k=\lceil n^{1-r}\rceil$; for some reason it doesn't render well in the displayed version on my screen.) Now

$$\sum_{k=\lceil n^{1-r}\rceil}^nk={n(n+1)-(\lceil n^{1-r}\rceil-1)\lceil n^{1-r}\rceil\over2}\ge{n(n+1)-n^{1-r}(n^{1-r}+1)\over2}\ge{n^2\over2}\left(1-{1\over n^{2r}}-{1\over n^{1+r}} \right)\ge{n^2\over2}\left(1-{2\over n^{2r}} \right)$$

It follows that

$${1-r\over2}\left(1-{2\over n^{2r}}\right)\le{1\over n^2}\sum_{k=1}^n{k\log k\over\log n}\le{1\over2}\left(1+{1\over n}\right)$$

Finally, let's let $r=1/\sqrt{\log n}$ Then $n^{2r}=e^{2r\log n}=e^{2\sqrt{\log n}}\to\infty$ as $n\to\infty$. It follows that

$${1-r\over2}\left(1-{2\over n^{2r}}\right)={1-(1/\log n)\over2}\left(1-{2\over e^{2\sqrt{\log n}}}\right)\to{1\over2}$$

and the Squeeze Theorem does the rest.

Added later: The low-tech approach also handles the Geometric Mean. Since $p_n/(n\log n)\to1$ as $n\to\infty$, it suffices to show

$${1\over n}\sum_{k=1}^n\log\left(n\log n\over p_k\right)\to1$$

If we write $p_k=(1+\epsilon_k)k\log k$ (for $k\gt1$) and note that $\epsilon_k\to0$ as $k\to\infty$, and again let $r=1/\sqrt{\log n}$ (with $n\gt2$), we have

$${1\over n}\sum_{k=1}^n\log\left(n\log n\over p_k\right)={1\over n}\sum_{k=1}^{\lfloor n^{1-r}\rfloor}\log\left(n\log n\over p_k\right)+{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log\left(n\log n\over (1+\epsilon_k)k\log k\right)\\ ={1\over n}\sum_{k=1}^{\lfloor n^{1-r}\rfloor}\log\left(n\log n\over p_k\right) -{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log(1+\epsilon_k) +{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log\left(\log n\over\log k\right) -{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log\left(k\over n\right)$$

Now for large $n=e^{u^2}$ (so that $r=1/u$), we have

$$0\lt{1\over n}\sum_{k=1}^{\lfloor n^{1-r}\rfloor}\log\left(n\log n\over p_k\right)\lt{1\over n}\sum_{k=1}^{\lfloor n^{1-r}\rfloor}\log\left(n\log n\over 2\right)\lt{\log(n\log n/2)\over n^r}={u^2+2\log u-\log2\over e^u}\to0$$

and

$$0\lt{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log\left(\log n\over\log k\right)\lt{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log\left(\log n\over\log n^{1-r}\right)\lt\log(1-r)\to0$$

We also have

$$\left|{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log(1+\epsilon_k)\right|\le\max_{\lceil n^{1-r}\rceil\le k\le n}|\log(1+\epsilon_k)|\to0$$

since the range over which the max is taken forces $\epsilon_k\to0$. Finally, we have

$$-{1\over n}\sum_{k=\lceil n^{1-r}\rceil}^n\log\left(k\over n\right) = {1\over n}\sum_{k=1}^{\lfloor n^{1-r}\rfloor}\log\left(k\over n\right) -{1\over n}\sum_{k=1}^n\log\left(k\over n\right)$$

where

$$0\lt{1\over n}\sum_{k=1}^{\lfloor n^{1-r}\rfloor}\log\left(n\over k\right)\lt{\log n\over n^r}={u^2\over e^u}\to0$$

and

$$-{1\over n}\sum_{k=1}^n\log\left(k\over n\right)\to-\int_0^1\log x\,dx=1$$