Sarko’s Prime Counting Function

Let \(\pi(x)\) denote the prime-counting function, i.e. the number of primes \(p \le x\).

A classical first-order approximation is

\[ \pi(x)\;\approx\;\frac{x}{\ln x}. \]

Definition

Sarko’s Prime Counting Function is the explicit approximation \(S(x)\) defined by

\[ S(x)\;=\;\frac{x\Bigl(1-\sqrt{\,1-\frac{4}{\ln(x)}\,}\Bigr)}{2}. \]

The goal is to compare \(S(x)\) against \(\frac{x}{\ln x}\) on standard benchmarks \(x=10^{10},10^{12},10^{14},10^{16}\).

Evaluation at powers of ten

The table below uses the known exact values of \(\pi(10^n)\) and reports each approximation’s absolute and relative error.

\(x\) \(\pi(x)\) \(\frac{x}{\ln x}\) \(S(x)\) \(\frac{x}{\ln x}-\pi(x)\) \(S(x)-\pi(x)\) rel. err \(\frac{x}{\ln x}\) rel. err \(S(x)\)
\(10^{10}\) 455,052,511 434,294,482 454,996,680 −20,758,029 −55,831 −4.562% −0.012269%
\(10^{12}\) 37,607,912,018 36,191,206,825 37,605,370,733 −1,416,705,193 −2,541,285 −3.767% −0.006757%
\(10^{14}\) 3,204,941,750,802 3,102,103,442,166 3,204,811,617,182 −102,838,308,636 −130,133,620 −3.209% −0.004060%
\(10^{16}\) 279,238,341,033,925 271,434,051,189,532 279,231,049,065,770 −7,804,289,844,393 −7,291,968,155 −2.795% −0.002611%

Takeaway

Across these benchmarks, \(\tfrac{x}{\ln x}\) undershoots \(\pi(x)\) by roughly \(2.8\%\)–\(4.6\%\), while \(S(x)\) stays within about \(0.0026\%\)–\(0.012\%\) (still a slight undershoot in each case). In absolute terms, \(S(x)\) reduces the error by orders of magnitude relative to \(\tfrac{x}{\ln x}\) at each tested scale.