Let $s>1$ be a real number. We look at the zeta probability function / Zipf probability function defined as:


$$P(X = n) = \frac{1}{n^s \zeta(s)}$$


Suppose $f: \mathbb{N} \rightarrow \mathbb{R}$ is a function such that the following limit exists:


$$\lim\_{s \rightarrow 1} E(f(X\_s)) = \lim\_{s \rightarrow 1} \lim\_{N\rightarrow \infty} \sum\_{k=1}^N f(k) P(X\_s =k ) =$$


$$ = \lim\_{s \rightarrow 1} \lim\_{N\rightarrow \infty} \sum\_{k=1}^N f(k) \frac{1}{k^s \zeta(s)} = \lim\_{s \rightarrow 1} \frac{1}{\zeta(s)}\lim\_{N\rightarrow \infty} \sum\_{k=1}^N \frac{f(k)}{k^s} = \lim\_{s \rightarrow 1} \frac{D\_f(s)}{\zeta(s)}$$


where $D\_f(s) = \sum\_{k=1}^\infty \frac{f(k)}{k^s}$ is a Dirichlet series which converges for $s>1$ and the limit $= \lim\_{s \rightarrow 1} \frac{D\_f(s)}{\zeta(s)}$ is defined and exists.


**Question:** Is $\lim\_{s \rightarrow 1} E(f(X\_s)) = \lim\_{N \rightarrow \infty} \frac{1}{N} \sum\_{k=1}^N f(k)$?


If this can be proven, then the Prime number theorem would follow by plugging in $f(X\_s) = \lambda(X\_s)$ where $\lambda(n) = (-1)^{\Omega(n)}$ is the Liouville function, since it is known since Landau's doctoral thesis in 1899 that the right hand side


$$\lim\_{N \rightarrow \infty} \frac{1}{N} \sum\_{k=1}^N \lambda(k) = 0$$


is equivalent to the Prime number theorem.


But if the above question can be positively answered, then, since by Wikipedia we know that the left hand side is equal to:


$$\lim\_{s \rightarrow 1 }\frac{D\_{\lambda}(s)}{\zeta(s)} = \lim\_{s \rightarrow 1} \frac{\zeta(2s)}{\zeta(s)^2} = \frac{\zeta(2)}{\infty} = 0$$


so the right hand side would also be equal to $0$ and the prime number theorem would follow.


Intuitively for $s \rightarrow 1$ the probability


$$\lim\_{s \rightarrow 1} P(X\_s \equiv 0 \mod(n)) = \lim\_{s \rightarrow 1} \frac{1}{n^s} = \frac{1}{n}$$


equals the "probability that a random uniform natural number $X$ is divisible by $n$", which is $1/n$. So that is why I would expect the question to be positively answered, since it is a question about two expected values:


$$\lim\_{s \rightarrow 1} E(f(X\_s)) =^? \lim\_{N \rightarrow \infty} \frac{1}{N} \sum\_{k=1}^N f(k) = \lim\_{N \rightarrow \infty} E(f(X\_N))$$


where $X\_N$ is a random number $1 \le X\_N \le N$ drawn uniformly with probability $1/N$.



Is $\lim_{s \rightarrow 1} E(f(X_s)) = \lim_{N \rightarrow \infty} \frac{1}{N} \sum_{k=1}^N f(k)$?
The answer is no. E.g., if
$$f(k)=\sum\_{j=0}^\infty 1(2^{2j}<k\le2^{2j+1})$$
for natural $k$, then
\begin{equation}
 Ef(X\_s)\to\frac13 \tag{1}\label{1}
\end{equation}
as $s\downarrow0$, whereas
$$\frac1n\,\sum\_{k=1}^n f(k)$$
will be forever oscillating between $\frac13$ and $\frac23$ as $n\to\infty$.


Indeed, let $s\downarrow0$. Then $\zeta(s)\sim\frac1{s-1}$ and
\begin{equation}
\begin{aligned}
 \zeta(s)Ef(X\_s)&=\sum\_{k=1}^\infty\frac{f(k)}{k^s} \\ 
 &=\sum\_{k=1}^\infty\frac1{k^s}\sum\_{j=0}^\infty 1(2^{2j}<k\le2^{2j+1}) \\ 
 &=\sum\_{j=0}^\infty\sum\_{k=1}^\infty\frac1{k^s} 1(2^{2j}<k\le2^{2j+1}) \\ 
 &=\sum\_{j=0}^\infty\Big(\int\_{2^{2j}}^{2^{2j+1}}\frac{dk}{k^s}
 +O\Big(\frac1{2^{2sj}}\Big) \Big) \\ 
 &=\sum\_{j=0}^\infty\frac{1-2^{1-s}}{s-1}\,2^{(1-s)2j}+O(1) \\ 
 &\sim\frac1{3(s-1)}, 
\end{aligned}
\end{equation}
so that \eqref{1} is proved.


On the other hand, letting
\begin{equation}
 s(n):=\sum\_{k=1}^n f(k) 
\end{equation}
and letting a natural $m$ go to $\infty$, we have
\begin{equation}
\begin{aligned}
 s(2^{2m+2})&=s(2^{2m+1}) \\ 
 &=\sum\_{k=1}^{2^{2m+1}}\sum\_{j=0}^\infty 1(2^{2j}<k\le2^{2j+1}) \\ 
 &=\sum\_{k=1}^{2^{2m+1}}\sum\_{j=0}^m 1(2^{2j}<k\le2^{2j+1}) \\ 
 &=\sum\_{j=0}^m\sum\_{k=1}^{2^{2m+1}} 1(2^{2j}<k\le2^{2j+1}) \\ 
 &=\sum\_{j=0}^m 2^{2j}\sim\frac43\,2^{2m}, 
\end{aligned}
\end{equation}
so that
\begin{equation}
 \frac{s(2^{2m+2})}{2^{2m+2}}\to\frac13,
\end{equation}
whereas
\begin{equation}
 \frac{s(2^{2m+1})}{2^{2m+1}}\to\frac23.
\end{equation}
So,
\begin{equation}
 \frac1n\,\sum\_{k=1}^n f(k)=\frac{s\_n}n
\end{equation}
oscillates (at least) between $\frac13$ and $\frac23$ as $n\to\infty$, as was claimed.


