= Solution
Every prime in $(\sqrt X,X]$ is at least $\sqrt X$. Consequently the <primorial> satisfies
$$
P(X)\geq(\sqrt X)^{\pi(X)-\pi(\sqrt X)}.
$$
Combining this with part (c) and taking logarithms gives
$$
\bigl(\pi(X)-\pi(\sqrt X)\bigr)\frac{\log X}{2}
\leq X\log4,
$$
so
$$
\pi(X)\leq\pi(\sqrt X)+\frac{2X\log4}{\log X}
\leq\sqrt X+\frac{2X\log4}{\log X}.
$$
For $X\geq2$, the inequality $\log X\leq\sqrt X$ implies
$$
\sqrt X\leq\frac{X}{\log X}.
$$
Thus the <prime-counting upper bound from a primorial estimate> yields
$$
\pi(X)\leq(1+2\log4)\frac{X}{\log X}.
$$
We may take $c=1+2\log4$.
Back to article page