# Examples in number theory where a heuristic argument fails

Many conjectures in number theory are motivated by heuristic arguments, and many results that are known to be true can be predicted by heuristic arguments.

To give an example, consider the Euler totient function $$\phi(n) = \lvert \{ x \leq n \mid (x,n) = 1 \} \rvert$$. If we try to estimate the size of $$\sum_{n \leq X} \phi(n)$$ as $$X \rightarrow \infty$$ we might loosely argue as follows: By the definition of $$\phi$$ we expect $$\sum_{n \leq X} \phi(n)$$ to be of order $$X^2$$ with density given by the probability of two random numbers $$m,n\leq X$$ being coprime. Assuming that the prime factors of a given number are random we might estimate this probability to be $$\frac{1}{2} \prod_{p \leq X} \left(1-\frac{1}{p^2}\right)$$, where the factor of $$1/2$$ appears because we need to attribute for counting both the pair $$(m,n)$$ and $$(n,m)$$

In fact, a fairly basic argument shows that $$\sum_{n \leq X} \phi(n) \sim \frac{3}{\pi^2}X^2,$$ where we note that $$\frac{1}{2} \prod_{p}\left(1-\frac{1}{p^2} \right) = \frac{1}{2\cdot\zeta(2)} = \frac{3}{\pi^2},$$ so the heuristic argument predicted the correct asymptotic.

My question is, are there examples where a similar kind of argument does not predict the right answer? I would expect this to happen, especially for more subtle examples since results such as Chebyshev's bias show that the distribution of primes is not as uniform as one might expect, however I am not aware of any explicit example.

• It was widely believed that $\pi(x)\lt\operatorname{li}(x)$, but then Littlewood and Skewes's number crushed that belief. – Vepir May 28 '20 at 13:38

Suppose you wanted to estimate the probability that $$x$$ is prime. Being prime is equivalent to $$x$$ not being divisible by $$2$$, by $$3$$, by $$5$$ and so on for all primes $$p < \sqrt{x}$$. So one might guess the probability is approximately

$$\prod_{p < \sqrt{x}} \left(1 - \frac{1}{p}\right).$$

On the other hand, by the prime number theorem, we know the expectation is $$(1/\log x)$$. So one might predict that

$$\prod_{p < \sqrt{x}} \left(1 - \frac{1}{p}\right) \sim^{?} \frac{1}{\log x}.$$

However, this is not the correct asymptotic, the actual asymptotic (by a theorem of Mertens) is

$$\prod_{p < \sqrt{x}} \left(1 - \frac{1}{p}\right) \sim \frac{2 e^{-\gamma}}{\log x}$$

where $$2 e^{-\gamma} \sim 1.1229\ldots$$.

There are in fact some more sophisticated heuristics which also (maybe?) differ from the correct answer by various factors related to $$e^{-\gamma}$$. One such heuristic comes from Cramer's model for gaps between primes. Again this is based on the idea that a number $$x$$ is prime with probability $$(1/\log x)$$. Cramer's model then predicts the following estimate for large gaps between primes:

$$\limsup \frac{p_{n+1} - p_n}{\log^2 p_n} =^{?} 1.$$

However, Granville has suggested that this model has issues on small intervals and that perhaps:

$$\limsup \frac{p_{n+1} - p_n}{\log^2 p_n} =^{?} 2 e^{-\gamma}.$$