The Prime Counting Function π(n)

Approximations:

Related:

Dream of a Formula

In this video it is presented the (informal) idea of a Riemann converter or Riemann harmonics:
Pasted image 20250716081301.png
Each non-trivial zero can be seen as a kind of oscillatory function, in such a way that:
Pasted image 20250716081633.png
That is, the prime counting function is approximately equal to the logarithmic integral and the correcting terms are given by the Riemann harmonics of the nontrivial zeroes of the Riemann zeta function.

In a more formal approach, there is an “exact” formula, due to Riemann, which expresses π(x) in terms of the non‑trivial zeros ρ of ζ(s). One convenient form is via the so‑called Riemann–von Mangoldt explicit formula for the weighted counting function

J(x)=n=1π(x1/n)n,

namely

J(x)=Li(x)ρLi(xρ)ln2+xdtt(t21)lnt,

where

Then one inverts the relation J(x)=n1π(x1/n)/n by Möbius inversion to recover π(x):

π(x)=n=1μ(n)nJ(x1/n),

where μ is the Möbius function.

Hence, although there is no elementary “closed‑form” for π(x), the above gives an exact representation in terms of the non‑trivial zeros of ζ(s).