Legendre's Constant

1. The prime number theorem in the form $$\pi(n)=\mathrm{li}(n)+O(ne^{-c\sqrt{\log n}})$$ combined with the approximation $$\mathrm{li}(n)=\frac{n}{\log n}+\frac{n}{\log^2 n}+O\left(\frac{n}{\log^3 n}\right)$$ shows that $$\pi(n)-\frac{n}{\log n}=\frac{n}{\log^2 n}+O\left(\frac{n}{\log^3 n}\right).$$ So the left hand side tends to infinity quite rapidly, it has no finite limit.

2. The correct definition of Legendre's constant is $$A:=\lim_{n\to\infty}\left(\log n-\frac{n}{\pi(n)}\right),$$ and the third display above shows that it equals $1$: \begin{align*}\log n-\frac{n}{\pi(n)} &=\log n-\frac{n}{\frac{n}{\log n}+\frac{n+o(n)}{\log^2 n}}\\ &=\log n-\frac{\log n}{1+\frac{1+o(1)}{\log n}}\\ &=(\log n)\left(1-\frac{1}{1+\frac{1+o(1)}{\log n}}\right)\\ &=(\log n)\left(1-1+\frac{1+o(1)}{\log n}\right)\\ &=(\log n)\frac{1+o(1)}{\log n}\\ &=1+o(1).\end{align*}


I'll stay clear from the infamous $B_L'$ notation.

Legendre's original (correct) statement is that

$$\pi(x)=\frac{Bx}{\log x-A+o(1)}$$

where the so-called "Legendre's constant" is $A$. The incorrect part was that he guessed that $A=1.08366$

As pointed out by Fedor Petrov, the definition with $\pi(n) - (n/\log(n))$ is clearly wrong.


Note. Using de la Vallée Poussin to disprove Legendre's conjecture is actually an overkill. This elementary argument is due to Pintz.

  • János Pintz, "On Legendre's prime number formula" (1980)

Let

$$\Psi(x)=Cx+\frac{(D+o(1))x}{\log x}$$

with some constants $C$ and $D$. Using Stirling and Legendre's formula,

\begin{equation*} \begin{split} \log x+O(1) &= \frac{\log [x]!}{x}=\frac{1}{x} \sum_{n\leq x} \Lambda (n) \left[ \frac{x}{n} \right]\\ & = \sum_{n\leq x} \frac{\Lambda (n)}{n}+\frac{1}{x} \sum_{n\leq x} \Lambda (n)O(1)\\ & = \int_2^x \frac{\Psi(t)}{t^2}dt+\frac{\Psi(x)}{x}+O\left( \frac{\Psi(x)}{x}\right)\\ & = \int_2^x \frac{C+\frac{D+o(1)}{\log t}}{t}dt+O(1)\\ & = C\log x + (D+o(1))\log\log x. \end{split} \end{equation*}

Therefore $C=1$ and $D=0$, that is,

$$\Psi(x)=x\left(1+\frac{o(1)}{\log x}\right).$$

And by partial summation we finally get $A=B=1$ in Legendre's formula.