Prime-counting function
$\pi(x)$ is a number of primes $p \leq x$.We can express it as: $$\pi(x) = \sum_{n>=1} \Pi(\sqrt[n]x)/n $$ where $\Pi(x)$ is modified prime counting function that has value very close to the function $\text{li}(x)$ $$\pi(x) = \int_2 \frac{\text{d} \vartheta(x)}{\ln x } = \frac{\vartheta(x)}{\ln x} - \int_2 \frac{\vartheta(x)\ \text{d}x}{x \ln^2 x}$$ where using that $\vartheta(x) = x - \varepsilon_{\vartheta}(x)$ we would obtain: $$\pi(x) = \text{li}(x) - \frac{\varepsilon_{\vartheta}(x)}{\ln x} + \int_2 \frac{\varepsilon_{\vartheta}(x)\ \text{d}x}{x \ln^2 x} + \left(\frac{2}{\ln 2} - \text{li} (2)\right)$$