# Error to sum of Euler phi-functions

The number theory identity $\phi(1) + \phi(2) + \dots + \phi(n) \approx \frac{3n^2}{\pi^2}$ can be interpreted as counting relatively prime pairs of numbers $0 \leq \{ x,y \} \leq n$ .

Has anyone studied the distribution of error term? $$\displaystyle \frac{1}{n} \left[\sum_{k=1}^n \phi(k) - \frac{3n^2}{\pi^2}\right]$$ It looks like white noise:

The histogram has a distinctive shape, maybe hard to prove. I suspect it's the Gaussian Unitary Ensemble (a Hermite polynomial times a Gaussian).

Similar questions:

Question concerning the arithmetic average of the Euler phi function:

averages of Euler-phi function and similar

• Sorry to contribute more noise to this post, but somehow I feel that this question admits an easy (fourier) answer, but unfortunately, I lack the knowledge to turn my feeling into a concrete answer. – Suvrit May 3 '12 at 19:37
• @Suvrit Since $\sum_{k=1}^\infty \phi(k) k^{-s} = \frac{\zeta(s-1}{\zeta(s)}$ then $\sum_{k \le n} \phi(k)$ has an explicit formula (which converges in the sense of distributions) in term of the zeros of $\zeta(s)$ – reuns Oct 25 '18 at 1:28
• @reuns, this is surprisingly wrong: the main contribution of the error term for this formula does not come from the zeroes of $\zeta(s)$. This is explained quite well in doi.org/10.1016/j.jnt.2010.06.010 – Peter Humphries Oct 25 '18 at 11:59

This is an interesting question. I don't think anyone has worked out what the distribution of the error term $$\frac{E(x)}{x} = \frac{1}{x}\left(\sum_{n \leq x}{\phi(n)} - \frac{3x^2}{\pi^2}\right)$$ actually looks like in any useful sense; from what I can make out, it seems to essentially be the same as the distribution of $$\sum_{n = 1}^{\infty}{\frac{\mu(n)}{n} \left\{\frac{x}{n}\right\}}$$ where $\mu(n)$ is the Möbius function and $\{x\}$ is the fractional part of $x$, but this doesn't really seem to tell you anything particularly useful.
Nevertheless, it certainly is known that $E(x)/x$ has a distribution function; this is proved on p.13 of "On the Existence of Limiting Distributions of Some Number-Theoretic Error Terms" by Yuk-Kam Lau. This also follows quite easily from the fact that $$\frac{E(x)}{x} = H(x) + O\left((\log x)^{-4}\right)$$ where $$H(x) = \sum_{n \leq x}{\frac{\phi(n)}{n}} - \frac{6 x}{\pi^2}$$ combined with the main result of the paper "The Existence of a Distribution Function for an Error Term Related to the Euler Function" by Erdős and Shapiro. What is better known is the average behaviour of $E(x)$, in the form of the asymptotics $$\sum_{n \leq x}{E(x)} \sim \frac{3 x^2}{2 \pi^2}$$ and $$\int^{x}_{0}{E(t)^2 dt} \sim \frac{x^3}{6 \pi^2}.$$
EDIT: Very recently, Lemke Oliver and Soundararajan have reproven the existence of the limiting distribution of $E(x)/x$, as well as quantitative bounds for the tails of this distribution; see Theorem 1.3 of their paper.
• I like your first expression with the Mobius function. Since my plot has three peaks, they may be related to the three values of $\mu(x) = -1,0,1$. – john mangual May 5 '12 at 12:00