The average fractional part of x/p

For a real number y , write \displaystyle \Big\{y\Big\}:=y-\lfloor y\rfloor for its fractional part. Assuming the prime number theorem, we shall prove that

\displaystyle \frac{1}{\pi(x)}\sum_{p\le x}\Big\{\frac{x}{p}\Big\}\longrightarrow 1-\gamma\approx 0.4227\cdots,

where \gamma is Euler’s constant. The quantities \displaystyle \Big\{x/p\Big\} fluctuate in a seemingly irregular way as p runs through the primes. The useful observation is that, after dividing by x , the primes up to x become uniformly distributed through \displaystyle \Big(0,1\Big] with respect to normalized prime counting measure. Since

\displaystyle \Big\{\frac{x}{p}\Big\}=\Big\{\frac{1}{p/x}\Big\},

the problem becomes one of averaging the fixed function \displaystyle f(t):=\Big\{\frac1t\Big\} over these scaled primes. The only issue is that f has infinitely many jumps accumulating at 0 . We first avoid that endpoint, and then show that the discarded interval makes a negligible contribution.

Indeed, for fixed \displaystyle 0<a<b\le1 , the prime number theorem gives

\displaystyle \frac{\pi(bx)-\pi(ax)}{\pi(x)}\longrightarrow b-a.

Thus the proportion of primes p\le x for which \displaystyle p/x\in (a,b] tends to the length of that interval. By first proving the assertion for step functions and then approximating bounded Riemann-integrable functions by step functions, one obtains, for every fixed \displaystyle 0<\delta<1 and every bounded Riemann-integrable function \displaystyle h:\Big[\delta,1\Big]\to\mathbb R,

\displaystyle \frac{1}{\pi(x)}\sum_{\delta x<p\le x}h\Big(\frac{p}{x}\Big)\longrightarrow\int_\delta^1h(t) dt.

Apply this with \displaystyle h(t)=\Big\{\frac1t\Big\}. On \displaystyle [\delta,1] , this function has only finitely many discontinuities, at the reciprocal integers lying in that interval, and so it is Riemann integrable. Therefore

\displaystyle \frac{1}{\pi(x)}\sum_{\delta x<p\le x}\Big\{\frac{x}{p}\Big\}\longrightarrow\int_\delta^1\Big\{\frac1t\Big\}dt.

The primes below \delta x do not affect the limit. Since \displaystyle 0\le\Big\{\frac1t\Big\}<1, we have

\displaystyle 0\le\frac{1}{\pi(x)}\sum_{p\le\delta x}\Big\{\frac{x}{p}\Big\}\le\frac{\pi(\delta x)}{\pi(x)}\longrightarrow\delta,

and similarly

\displaystyle 0\le\int_0^\delta\Big\{\frac1t\Big\}dt\le\delta.

Letting \delta\downarrow0 , we obtain

\displaystyle \frac{1}{\pi(x)}\sum_{p\le x}\Big\{\frac{x}{p}\Big\}\longrightarrow\int_0^1\Big\{\frac1t\Big\} dt.

It remains to evaluate the integral. For each integer m\ge1 , on the interval \frac{1}{m+1}<t\le\frac{1}{m}, one has \lfloor1/t\rfloor=m , and hence \Big\{\frac{1}{t}\Big\}=1/t-m. Thus

\displaystyle \begin{aligned} \int_0^1\Big\{\frac1t\Big\} dt &=\sum_{m\ge1}\int_{1/(m+1)}^{1/m}\Big(\frac1t-m\Big)dt \\ &=\sum_{m\ge1}\Big(\log\frac{m+1}{m}-\frac1{m+1}\Big). \end{aligned}

The M -th partial sum is \displaystyle \log(M+1)-\Big(H_{M+1}-1\Big)=1+\log(M+1)-H_{M+1}, where \displaystyle H_N:=\sum_{m\le N}\frac1m is the harmonic sum. Since \displaystyle H_N-\log N\longrightarrow\gamma, it follows that

\displaystyle \int_0^1\Big\{\frac1t\Big\} dt=1-\gamma.

Consequently,

\displaystyle \frac{1}{\pi(x)}\sum_{p\le x}\Big\{\frac{x}{p}\Big\}\longrightarrow1-\gamma.

The limiting average is not \displaystyle 1/2, because the fractional parts \displaystyle \Big\{\frac{x}{p}\Big\} do not themselves become uniformly distributed. Rather, it is the scaled position \displaystyle p/x\in(0,1] of the prime that becomes uniform. The nonlinear transformation \displaystyle t\mapsto\Big\{\frac{1}{t}\Big\} then turns this uniform distribution into one with mean \displaystyle 1-\gamma.

Leave a comment