Fractional Parts of log n

Let \log denote the natural logarithm. We consider the fractional parts \{\log 1\},\{\log 2\},\{\log 3\},\dots as points on the interval [0, 1) . It is tempting to think that these points should spread uniformly around the interval, because \log n\to\infty : the sequence winds around the interval infinitely often, crossing each integer infinitely many times. But this intuition confuses two different facts. A sequence may keep circling forever while still spending systematically more time in some arcs than in others. In fact, the fractional parts of \log n are not equidistributed modulo 1 . The reason is not delicate: ordinary counting measure on the integers is not uniform in the logarithmic coordinate. Under the change of variables u=\log x , one has dx=e^udu . Thus equal intervals in the u -coordinate carry different amounts of ordinary counting mass: an interval near u=1 carries about e times as much mass as a corresponding interval near u=0 . By contrast, dx/x=du , so the harmonic weight 1/n is exactly the discrete weighting which makes the logarithmic coordinate flat.

A sequence x_n \in\mathbb R/\mathbb Z is equidistributed modulo 1 when every interval [a,b)\subset[0,1) receives its expected proportion of points:

\displaystyle \frac {| \{n\le N:x_n\in[a,b)\}|}  {N} \longrightarrow b-a.

For the sequence x_n=\{\log n\} , this would mean

\displaystyle \frac{ |\{n\le N:\{\log n\}\in[a,b)\}|}{N} \longrightarrow b-a.

Equivalently, the empirical measures \displaystyle \mu_N:=\frac1N \sum_{n\le N}\delta_{{\log n}} would approach Lebesgue measure du . The question is therefore not whether \log n continues to wind around the interval, but whether ordinary counting gives equal mass to equal logarithmic arcs.

Fix a large integer k . The k -th full turn around the logarithmic interval corresponds to the shell k\le\log n<k+1, or, equivalently, e^k\le n<e^{k+1}. Suppose that, during this turn, we look at the small logarithmic arc [u,u+du]\subset[0,1) . The corresponding integers satisfy k+u\le\log n<k+u+du, which is the same as e^{k+u}\le n<e^{k+u+du}. The length of this ordinary interval is approximately \displaystyle e^{k+u}du. Thus, within one logarithmic revolution, ordinary counting assigns mass proportional to e^{k+u}du . The factor e^k depends only on which revolution we are considering, but the factor e^u depends on the position inside that revolution. Points with fractional logarithm near 1 therefore occur more often than points with fractional logarithm near 0 . This alone already rules out uniform distribution. There is also an important global effect. The shell [e^k,e^{k+1}) contains approximately (e-1)e^k integers, so every new logarithmic turn is roughly e times larger than the preceding turn. Consequently, the last few logarithmic shells before a large cutoff contain a positive proportion of all integers below that cutoff. The earlier shells never become numerous enough to average away the persistent bias of the late shells. This is completely unlike a standard rotation n\alpha\pmod1 , where the phase moves by a fixed increment. Here the successive angular increments satisfy

\displaystyle \log(n+1)-\log n=\log(1+\frac1n)\sim\frac1n,

so the motion around the interval slows down indefinitely. The cleanest cutoffs are N_M=\lfloor e^M\rfloor , where M is an integer. Let

\displaystyle A_M(a,b):=|\{n\le e^M:\{\log n\}\in[a,b)\}|.

The condition \{\log n\}\in[a,b) means that, for some integer k , k+a\le\log n<k+b, or equivalently, e^{k+a}\le n<e^{k+b}. Splitting the count into shells gives

\displaystyle A_M(a,b)=\sum_{k=0}^{M-1} | \{e^{k+a}\le n<e^{k+b}\}|.

Each summand is e^{k+b}-e^{k+a}+O(1)=(e^b-e^a)e^k+O(1). Therefore A_M(a,b)=(e^b-e^a)\sum_{k=0}^{M-1}e^k+O(M). Since \sum_{k=0}^{M-1}e^k=\frac{e^M-1}{e-1}, we obtain

\displaystyle A_M(a,b)=\frac{e^b-e^a}{e-1}e^M+o(e^M).

After dividing by e^M , this becomes

\displaystyle \frac1{e^M} | \{n\le e^M:\{\log n\}\in[a,b)\}|  \longrightarrow\frac{e^b-e^a}{e-1}.

So the limiting proportion is not b-a . For example,

\displaystyle \frac1{e^M}| \{n\le e^M:0\le\{\log n\}<\tfrac12\}| \longrightarrow\frac{\sqrt e-1}{e-1},

and the limit is approximately 0.378 , not 1/2 . Thus the first half of the logarithmic interval receives about 37.8% of the integers, while the second half receives about 62.2% . Along the cutoffs e^M , ordinary counting produces the density

\displaystyle \rho_0(u):=\frac{e^u}{e-1},\quad 0\le u<1,

because \displaystyle \int_a^b\frac{e^u}{e-1}du=\frac{e^b-e^a}{e-1}. The cutoffs e^M are special because they end at the boundary between two logarithmic turns. For an arbitrary cutoff, the final incomplete shell has a positive proportion of the total mass, and its contribution depends on the place where the cutoff occurs inside that shell. Write N_M(\theta):=\lfloor e^{M+\theta}\rfloor,\quad 0\le\theta<1. The parameter \theta is the phase of the final cutoff: it records where \log N_M(\theta) lies modulo 1 . The completed shells contribute the old density, while the final incomplete shell contributes additional mass only to the arc [0,\theta) . The limiting density along this subsequence is

\displaystyle \rho_\theta(u)=\begin{cases}\dfrac{e}{e-1}e^{u-\theta},&0\le u<\theta,\\ \dfrac1{e-1}e^{u-\theta},&\theta\le u<1.\end{cases}

The additional factor on the first interval appears because that part of the last logarithmic turn has already been traversed before the cutoff. Equivalently, for an interval [a,b) ,

\displaystyle \frac1{N_M(\theta)} | \{n\le N_M(\theta):\{\log n\}\in[a,b)\}| \longrightarrow e^{-\theta}\Big(\frac{e^b-e^a}{e-1}+\Big(e^{\min(b,\theta)}-e^a\Big)_+\Big),

where y_+:=\max(y,0) . Thus ordinary counting does not merely converge to the wrong limiting measure. In general it has no single limiting measure at all. Instead, there is a one-parameter family of limiting distributions, indexed by the limiting phase \theta=\{\log N\} .

Weyl Sequences

The direct counting argument describes the distribution in physical space. Weyl’s criterion expresses the same issue in Fourier space. A sequence x_n\in\mathbb R/\mathbb Z is equidistributed modulo 1 if and only if, for every nonzero integer h ,

\displaystyle \frac1N\sum_{n\le N}\exp(2\pi i h x_n)\longrightarrow0.

The meaning is straightforward. The functions u\mapsto\exp(2\pi i h u) are the nonconstant Fourier waves on the circle, and each has zero average against uniform measure:

\displaystyle \int_0^1\exp(2\pi i h u),du=0,\quad h\ne0.

Thus a uniformly distributed sequence must have vanishing average against every nonconstant Fourier mode. Conversely, if all these Fourier averages tend to zero, then the averages of every trigonometric polynomial tend to its integral. Since trigonometric polynomials uniformly approximate continuous periodic functions, the same becomes true for every continuous function on the circle. Approximating interval indicators from above and below by continuous functions then yields equidistribution.

Apply this criterion to x_n=\{\log n\} . For a fixed nonzero integer h , the relevant Weyl sum is

\displaystyle S_h(N):=\frac1N\sum_{n\le N}\exp(2\pi i h\log n).

Put t:=2\pi h. Then S_h(N)=\frac1N\sum_{n\le N}n^{it}. Factoring out the scale N^{it} gives

\displaystyle S_h(N)=N^{it}\Big[\frac1N\sum_{n\le N}\Big(\frac nN\Big)^{it}\Big].

The expression in brackets is a Riemann sum for u^{it} on [0,1] . The function has modulus 1 on (0,1] , and it has only one point of discontinuity after assigning any value at 0 . Therefore it is Riemann integrable, and

\displaystyle \frac1N\sum_{n\le N}\Big(\frac nN\Big)^{it}\longrightarrow\int_0^1u^{it}du=\frac1{1+it}.

Consequently,

\displaystyle \frac1N\sum_{n\le N}\exp(2\pi i h\log n)=\frac{\exp(2\pi i h\log N)}{1+2\pi i h}+o(1).

The leading term has nonzero magnitude. In particular,

\displaystyle \Big|S_h(N)\Big|\longrightarrow\frac1{\sqrt{1+4\pi^2h^2}},

so the Weyl sums do not tend to zero. Weyl’s criterion therefore proves again that \{\log n\} is not equidistributed modulo 1 . The same asymptotic can be obtained with an explicit error term. Let f(x):=x^{it} . Then f'(x)=itx^{it-1},\quad |f'(x)|=\frac{|t|}{x}. Comparing the sum with the integral on each interval [n,n+1] gives

\displaystyle \sum_{n\le N}n^{it}=\int_1^Nx^{it} dx+O_t(\log N).

Since \int_1^Nx^{it}dx=\frac{N^{1+it}-1}{1+it}, we get

\displaystyle \frac1N\sum_{n\le N}n^{it}=\frac{N^{it}}{1+it}+O_t\Big(\frac{\log N}{N}\Big).

For t=2\pi h , this is exactly

\displaystyle \frac1N\sum_{n\le N}\exp(2\pi i h\log n)=\frac{\exp(2\pi i h\log N)}{1+2\pi i h}+O_h\Big(\frac{\log N}{N}\Big).

The main term is an endpoint contribution, coming from the upper limit in the integral. Analytically, it records the same fact that direct counting revealed geometrically: the final logarithmic scales dominate ordinary counting measure.

For a usual linear exponential sum such as \sum_{n\le N}\exp(2\pi i n\alpha), the phase changes by the same amount at every step. Unless \alpha is near an integer, the vectors continually rotate, and substantial cancellation can accumulate. The logarithmic phase behaves differently. If \phi(n):=2\pi h\log n, then \phi(n+1)-\phi(n)=2\pi h\log(1+\frac1n)\sim\frac{2\pi h}{n}. Near n=N , consecutive vectors \exp(2\pi i h\log n) are almost parallel. More importantly, on a final interval [cN,N] , where 0<c<1 is fixed, the total phase variation is 2\pi h\log(\frac{N}{cN})=2\pi h\log(\frac1c), which is independent of N . A positive proportion of all terms therefore lies in a region where the phase turns only a bounded amount. The vectors cannot cancel more and more effectively as N\to\infty ; they retain a nonzero average direction. The factor \exp(2\pi i h\log N) in the Weyl-sum asymptotic describes that surviving direction, while the denominator 1+2\pi i h measures the fixed amount of cancellation occurring inside the final scale.

The Fourier coefficients of the density found by direct counting recover exactly the same calculation. Along N=e^M , the limiting density was \rho_0(u)=\frac{e^u}{e-1}. Its h -th Fourier coefficient is

\displaystyle \int_0^1\exp(2\pi i h u)\rho_0(u)du =\frac1{e-1}\int_0^1e^{(1+2\pi i h)u}du=\frac1{1+2\pi i h}.

This is precisely the limit of the Weyl sum along N=e^M :

\displaystyle \frac1{e^M}\sum_{n\le e^M}\exp(2\pi i h\log n)\longrightarrow\frac1{1+2\pi i h}.

Thus the density calculation and the Weyl-sum calculation are not separate phenomena. They are Fourier transforms of one another. The density e^u/(e-1) is the physical-space description of the bias, and the nonzero coefficients 1/(1+2\pi i h) are its Fourier-space description.

The same relation persists along the phase subsequences N_M(\theta)=\lfloor e^{M+\theta}\rfloor . Since \log N_M(\theta)=M+\theta+o(1), the Weyl sums satisfy

\displaystyle \frac1{N_M(\theta)}\sum_{n\le N_M(\theta)}\exp(2\pi i h\log n)\longrightarrow\frac{\exp(2\pi i h\theta)}{1+2\pi i h}.

These are exactly the Fourier coefficients of the phase-dependent density \rho_\theta . So every possible limiting phase produces its own limiting measure, and the Weyl sums detect that measure completely.

The failure of ordinary equidistribution is not a mysterious arithmetic property of the integers. It is a mismatch between ordinary counting and logarithmic coordinates. Ordinary counting corresponds to the continuous measure dx , and under u=\log x one has dx=e^udu. Thus ordinary counting produces the factor e^u . But \frac{dx}{x}=du, so the measure dx/x gives equal mass to equal logarithmic intervals. Its discrete analogue is the harmonic weight 1/n . Let H_N:=\sum_{n\le N}\frac1n. Since H_N=\log N+O(1) , the normalized weighted averages

\displaystyle \frac{1}{H_N}\sum_{n\le N}\frac{1}{n} f(\{\log n\})

are logarithmic averages. To prove weighted equidistribution, it is enough to show that for each nonzero integer h ,

\displaystyle \frac1{H_N}\sum_{n\le N}\frac1n\exp(2\pi i h\log n)\longrightarrow0.

Again put t=2\pi h . The numerator is \sum_{n\le N}n^{-1+it}. Compare it with \int_1^Nx^{-1+it}dx. The derivative satisfies \frac{d}{dx}x^{-1+it}=(-1+it)x^{-2+it}, and its absolute value is integrable on [1,\infty) : \int_1^\infty|(-1+it)x^{-2+it}|,dx<\infty. Therefore the sum and the integral differ by O_t(1) . But

\displaystyle \int_1^Nx^{-1+it} dx=\frac{N^{it}-1}{it},

which is bounded when t\ne0 . Hence \sum_{n\le N}n^{-1+it}=O_t(1). After dividing by H_N=\log N+O(1) , we obtain

\displaystyle \frac1{H_N}\sum_{n\le N}\frac1n\exp(2\pi i h\log n)\longrightarrow0,\quad h\ne0.

Weighted Weyl’s criterion now gives

\displaystyle \frac1{H_N}\sum_{{n\le N , ~  \{\log n\} \in[a,b)}}\frac1n\longrightarrow b-a.

Thus the fractional parts of \log n are equidistributed when integers are counted harmonically. The shell calculation makes this almost immediate:

\displaystyle \sum_{e^{k+a}\le n<e^{k+b}}\frac1n \approx\int_{e^{k+a}}^{e^{k+b}}\frac{dx}{x}=b-a.

Every completed logarithmic revolution contributes approximately the same weighted mass to every fixed arc. Ordinary counting sees local mass e^{k+u} du ; harmonic counting sees simply du .

The same geometry persists when integers are replaced by primes. Consider the fractional parts \{\log p\} , with p running through the primes. Under ordinary prime counting, these fractional parts are again not equidistributed. In the logarithmic shell e^{k+u}\le p<e^{k+u+du}, the prime number theorem predicts approximately \frac{e^{k+u}}{k+u}du primes. When k is large, the factor 1/(k+u) changes only slowly across a single turn, while the essential dependence on u remains e^u . Thus, along cutoffs X=e^M ,

\displaystyle \frac1{\pi(e^M)} | \{ p\le e^M:\{\log p\}\in[a,b)\} | \longrightarrow\frac{e^b-e^a}{e-1}.

The same Fourier obstruction appears:

\displaystyle \frac1{\pi(X)}\sum_{p\le X}\exp(2\pi i h\log p) =\frac{\exp(2\pi i h\log X)}{1+2\pi i h}+o(1),\qquad h\ne0.

The logarithmically natural prime weight is not 1/p , but (\log p)/p . Indeed, prime density is roughly dx/\log x , and therefore \frac{\log x}{x}\cdot\frac{dx}{\log x}=\frac{dx}{x}. This weighting flattens the logarithmic coordinate. One obtains

\displaystyle \dfrac {\sum_{p\le X, } 1( \{\log p\}\in[a,b) ) \frac{\log p}{p} }  {\sum_{p\le X}\frac{\log p}{p} } \longrightarrow b-a.

Equivalently, for each nonzero integer h ,

\displaystyle \dfrac {\sum_{p\le X} \frac{\log p}{p}\exp(2\pi i h\log p)} {\sum_{p\le X}\frac{\log p}{p}} \longrightarrow 0.

For integers and primes alike, the same principle is at work: ordinary counting produces the exponential bias e^u in logarithmic coordinates, while the natural logarithmic weighting makes the coordinate uniform. The sequence \log n goes around the interval infinitely many times, but it does not move around it at a uniform speed. Its increments are asymptotic to 1/n , so the motion slows down forever. At the same time, ordinary counting increasingly favors the largest integers, which lie in the final logarithmic shell before the cutoff. That shell has a permanent effect on the average, and the effect survives exactly as the main term

In the Weyl sums \frac1N\sum_{n\le N}\exp(2\pi i h\log n) =\frac{\exp(2\pi i h\log N)}{1+2\pi i h}+o(1), the denominator records bounded cancellation within one large scale, while the phase factor remembers the position of the final cutoff on the logarithmic interval. Once ordinary counting is replaced by harmonic weighting, the coordinate becomes flat because dx/x=du . The Weyl sums then vanish after normalization, and the fractional parts of \log n behave like a genuinely uniform angular variable.

Leave a comment