# Approximation of primorial # in terms of $\pi(x)$

I would like to approximate # in terms of $\pi(x)$.

The nearest I have found is by the answer of @draks:

Interpolating the primorial $p_{n}\#$

It seems to use asymptotic integration:

$\begin{eqnarray} \sum_{k=1}^n \log p_n &=& \int_2^n \log k\; d\pi(k)\\ &=& \log(k)\pi(k)\biggr|_{2}^{n}+\int_{2}^{n}\frac1k \pi(k)dk. \end{eqnarray}$

using $\pi(n)\sim \frac{n}{\log n}$

$\log p_n\# \sim \log(k)\frac{k}{\log k}\biggr|_{2}^{n}+\int_{2}^{n}\frac1k \frac{k}{\log k}dk = (x-1)+\text{Li}(x) \;. \tag{$*$}$

then exponentiate*.

1) No error bound is given and I assume (maybe wrongly) it wound be whatever error there is in the estimation of $\pi(n)$?

2) No reference is given so I am not sure if this method is widely accepted? Would it work? What are the bounds?

3) Is there something better for approximating primorial # in terms of π(x)?.

EDIT: Regarding question 2) There is at least one relevant reference (page 4-5) to using asymptotic integration for finding θ(x) in terms of π(x):

http://math.tufts.edu/faculty/rlemkeoliver/teaching/250/02-RiemannStieltjes.pdf

Hopefully this might help somebody looking at the stackexchange link given above.

• I think the integration by parts should subtract $\int\frac1k\pi(x)dx$ instead of adding it; so subtract Li(x) instead of adding it in the final equation. Commented Dec 11, 2017 at 15:40
• that's what I thought too Commented Dec 11, 2017 at 15:59

There is no error at all in the expression

$$\log p_n \# = \log (t) \pi(t) \Big|_2^n - \int_2^n \frac{\pi(t)}{t} dt. \tag{1}$$

Thus if you are looking to write $p\#$ in terms of $\pi(x)$, then you have the equality

$$p_n \# = \exp \left( \log (t) \pi(t) \Big|_2^n - \int_2^n \frac{\pi(t)}{t} dt\right).\tag{2}$$

Concerning your questions at the end of your post, it amounts to estimating the line $(2)$ above. You can make totally rigorous bounds in terms of rigorous bounds on $\pi(x)$.

Your question 2 doesn't quite make sense, as no reference is needed --- it is a proof. If you don't understand the proof, then it's likely you aren't familiar with Riemann-Stieltjes integration, as what's done is to write the sum as a Riemann-Stieltjes integral and then perform integration by parts. The result of this is exactly $(1)$ above.

• thanks for the answer. I do get the gist of it as it closely follows the asymptotic integration (Riemann-Stieltjes integration) sum of primes found in Bach & Shallit, but I'm not sure why such an elegant method is not widely found like the analogous sum of primes so I was hoping somebody would point to a book or something. That said with your assurance I'm happy with your answer. Commented Dec 11, 2017 at 15:59
• Hello, could you please clarify? Formula (1) doesn't add up. If you take n=25, p_25=97. The sum of the logs of the first 25 primes is 83.72 = the LHS of (1). But then the first term of the RHS is log(25) * pi(25) - log(2) * pi(2), which is 3.21 * 9 - .69 * 1 = 26.89, and the integral is positive ... so what am I doing wrong? Thank you.
– EGME
Commented Oct 30, 2021 at 9:27
• Even if you add the integral, which Mathematica tells me is 9.74, it still doesn't add up, that is, the LHS of (1) is way smaller than the RHS. Thank you.
– EGME
Commented Oct 30, 2021 at 9:36