# Inequalities for two functions related to the primorial function

We denote by $$\mathcal P=\lbrace 2,3,5,7,\ldots\rbrace$$ the set of prime-numbers and by $$\mathcal P^*=\lbrace 2,3,4,5,7,8,9,1,13,16,\ldots\rbrace$$ the set of non-trivial prime-powers. We consider the two functions $$A(n)=\prod_{p\in\mathcal P,p\leq n}p$$ (the product of all primes up to $$n$$, usually called the primorial function and written $$\sharp n$$) and $$B(n)=\prod_{q\in\mathcal P^*,q\leq n}q$$ (the product of all prime-powers up to $$n$$).

Is it true that $$A(n) for $$n\geq 8$$?

Short answer: No (both inequalities fail infinitely often, see Wojowu's answer below).

(This has certainly been studied but I am lousy at finding references.)

Remarks: The inequalities hold up to $$10^6$$.

The figure gives values of $$\sqrt{n}-\frac{1}{\sqrt{n}}\log(A(n))$$ and $$\sqrt{n}-\frac{1}{\sqrt{n}}\log(B(n))$$ for all prime-powers up to $$n=10^5$$.

The normalization $$\frac{n-\log(X(n))}{\sqrt{n}}$$ (for $$X\in\lbrace A,B\rbrace$$) is suggested by the obvious identity $$B(n)=\prod_k A(\lfloor n^{1/k}\rfloor)^k$$ suggesting convergency of $$\frac{\log(B(n))-\log(A(n))}{\sqrt{n}}$$ (with values at prime-powers up to $$10^5$$) to $$2$$.

Suitably strong versions of the prime-number theorem should give $$\lim_{n\rightarrow\infty} \frac{1}{n}\log(A(n))=\lim_{n\rightarrow\infty} \frac{1}{n}\log(B(n))=1.$$

D. Hanson (On the product of primes) gives the inequality $$A(n)<3^n$$ which is weaker. It seems that slightly stronger results are known but I could not find the inequalities above (which are perhaps not true!)

One can also consider the function $$C(n)=\mathrm{lcm}(2,3,4,\ldots,n)$$ defined as the product of all largest prime-powers $$\leq n$$. The number $$C(n)$$ is obviously a multiple of $$A(n)$$ and a divisor of $$C(n)$$. The function $$C(n)$$ is the exponential of second Chebyshev function.

It seems to oscillate (very irregularly) around $$e^n$$ as suggested by the graph depicting the values of $$\frac{n-\log(C(n))}{\sqrt{n}}$$ at prime powers up to $$10^5$$.

• Primorial is usually defined as the product of primes up to $n$, not product of first $n$ primes, so (as the kodlu's answer says) it is $A(n)$ itself, not $A(p_n)$, that is the primorial. Jan 6 at 11:33

Let $$\theta(x)=\sum_{p\leq x}\log p$$ be first Chebyshev function. Then we have $$A(n)=e^{\theta(n)}$$, and $$B(n)=\prod_k A(n^{1/k})^k=e^{\sum_k k\theta(n^{1/k})}.$$ One can easily show that $$\sum_k k\theta(n^{1/k})=\theta(n)+O(\sqrt{n})$$, so the question ultimately comes down to showing how oscillatory the behavior of the difference $$\theta(n)-n$$ (which, by PNT, is $$o(n)$$) is.
The answer is classical and dates back to Hardy and Littlewood, see Wikipedia for references - the oscillations in both positive and negative direction exceed (a constant times) $$\sqrt{n}\log\log\log n$$ infinitely often. This in particular implies that for arbitrarily large $$n$$ we have $$A(n)>e^n$$, as well as for arbitrarily large $$n$$ we have $$B(n).
However, it is not surprising to be mislead by the numerics. While counterexamples to $$A(n) are infinite in number, the least such is also quite large - the first such exceeds $$10^{17}$$, and our best upper bound on a counterexample is on the order of $$10^{316}$$. See this MO post.
The function $$C(n)$$ you propose can be written as $$e^{\psi(n)}$$, where $$\psi$$ is the second Chebyshev function. We have $$\psi(n)=\theta(n)+O(\sqrt{n})$$, so similar remarks as above apply to this function.
Your $$A(n)$$ is usually denoted by $$n\#$$ https://en.wikipedia.org/wiki/Primorial and is related to the first Chebyshev function via $$\ln n\#=\theta(n)$$ where $$\theta(x)=\sum_{p\leq x} \ln p.$$ This immediately gives $$A(n)=\exp\{n(1+o(1))\}.$$ The inequalities on Chebyshev in the second link make this precise.