<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\newcommand{\la}{\lambda}
\newcommand{\tl}{\text{li}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\p}{\phantom}
\newcommand{\q}{\quad}
\newcommand{\nn}{\nonumber}

\begin{center}
\vskip 1cm{\LARGE\bf On a Sequence Involving Prime Numbers}
\vskip 1cm
\large
Christian Axler\\
Departament of Mathematics\\
Heinrich-Heine-Universit\"at\\
40225 D\"usseldorf\\
Germany\\
\href{mailto:Christian.Axler@hhu.de}{\tt Christian.Axler@hhu.de}\\
\end{center}

\vskip .2 in

\begin{abstract}
We study a particular sequence $C_n = np_n - \sum_{k \leq n}p_k$, $n
\in \N$, involving prime numbers by deriving two asymptotic formulae,
and we find a new lower bound for $C_n$ that improves the currently known
estimates. Furthermore, for the first time we determine an upper bound
for $C_n$.
\end{abstract}

\section{Introduction} \label{sec1}

In this paper, we study the sequence $(C_n)_{n \in \N}$ with
\begin{displaymath}
C_n = np_n - \sum_{k \leq n} p_k,
\end{displaymath}
where $p_n$ is the $n$th prime number. The motivation for considering this special sequence is an inequality conjectured by Mandl \cite[p.\ 1]{rs}
that  asserts that
\begin{equation}\label{101}
\frac{np_n}{2} - \sum_{k \leq n} p_k \geq 0
\end{equation}
for every $n \geq 9$. This inequality originally appeared without proof.
In his 1998 thesis \cite{pd}, Dusart used the equality
\begin{displaymath}
C_n = \int_2^{p_n} \pi(x) \, dx,
\end{displaymath}
where $\pi(x)$ denotes the number of primes $\leq x$, and explicit estimates for the prime counting function $\pi(x)$ to prove that
\begin{displaymath}
C_n \geq \frac{np_n}{2},
\end{displaymath}
which is equivalent to Mandl's inequality \eqref{101}, for every $n \geq 9$. At the same time, Dusart \cite{pd} showed that
\begin{equation} \label{102}
C_n \geq c + \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n}
\end{equation}
for every $n \geq 109$, where $c \doteq -47.1$. The first goal of this article is to study the asymptotic behaviour of the sequence $C_n$. This is
done in the following two theorems.

\begin{theorem}[Corollary \ref{k202}] \label{t101}
For each $s \in \N$ there is a unique monic polynomial $U_s$ of degree $s$ with rational coefficients, so that for every $m \in \N$
\begin{displaymath}
C_n = \frac{n^2}{2} \left( \log n + \log \log n - \frac{1}{2} + \sum_{s=1}^{m} \frac{(-1)^{s+1}U_s(\log \log n)}{s\log^sn} \right) + O \left( 
\frac{n^2(\log \log n)^{m+1}}{\log^{m+1} n} \right).
\end{displaymath}
\end{theorem}

\begin{theorem}[Theorem \ref{t205}] \label{t102}
For each $m \in \N$ we have
\begin{equation} \label{103}
C_n = \sum_{k=1}^{m-1} (k-1)! \left(1 - \frac{1}{2^k} \right) \frac{p_n^2}{\log^k p_n} + O \left( \frac{p_n^2}{\log^m p_n} \right).
\end{equation}
\end{theorem}

By setting $m=9$ in \eqref{103}, we get
\begin{equation} \label{104}
C_n = \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4\log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} + \chi(n) + O \left( \frac{p_n^2}{\log^9 p_n} \right),
\end{equation}
where
\begin{displaymath}
\chi(n) = \frac{45 p_n^2}{8\log^4 p_n} + \frac{93p_n^2}{4\log^5 p_n} + \frac{945p_n^2}{8 \log^6 p_n} + \frac{5715p_n^2}{8 \log^7 p_n} +
\frac{80325p_n^2}{16 \log^8 p_n}.
\end{displaymath}

In view of \eqref{104}, we improve the inequality \eqref{102} by finding the following lower bound for $C_n$.

\begin{theorem}[Proposition \ref{p504}] \label{t103}
If $n \geq 52703656$, then
\begin{displaymath}
C_n \geq \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} + \Theta(n),
\end{displaymath}
where
\begin{displaymath}
\Theta(n) = \frac{43.6p_n^2}{8\log^4 p_n} + \frac{90.9p_n^2}{4\log^5 p_n} + \frac{927.5p_n^2}{8\log^6 p_n} + \frac{5620.5p_n^2}{8\log^7 p_n} +
\frac{79075.5p_n^2}{16\log^8 p_n}.
\end{displaymath}
\end{theorem}

Finally, for the first time we give
an upper bound for $C_n$, by proving the following theorem.

\begin{theorem}[Proposition \ref{p507}] \label{t104}
For every $n \in \N$,
\begin{displaymath}
C_n \leq \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} + \Omega(n),
\end{displaymath}
where
\begin{displaymath}
\Omega(n) = \frac{46.4p_n^2}{8\log^4 p_n} +  \frac{95.1p_n^2}{4\log^5 p_n} + \frac{962.5p_n^2}{8\log^6 p_n} + \frac{5809.5p_n^2}{8\log^7 p_n} +
\frac{118848p_n^2}{16\log^8 p_n}.
\end{displaymath}
\end{theorem}

\section{Two asymptotic formulae for $C_n$} \label{sec2}

From here on, we use the following notation. Cipolla \cite{cp} showed that for each $s \in \N$ and each $0 \leq i \leq s$ there exist unique rational
numbers $a_{is}$, where $a_{ss} = 1$, such that for every $m \in \N$
\begin{equation} \label{205}
p_n = n\left( \log n + \log \log n - 1 + \sum_{s=1}^m \frac{(-1)^{s+1}}{s\log^s n} \sum_{i=0}^s a_{is}(\log \log n)^i \right) + O (c_m(n)),
\end{equation}
where
\begin{displaymath}
c_m(n) = \frac{n(\log \log n)^{m+1}}{\log^{m+1} n}.
\end{displaymath}
We set
\begin{displaymath}
h_m(n) = \sum_{j=1}^{m} \frac{(j-1)!}{2^j \log^j n}.
\end{displaymath}
Further, we recall the following definition from \cite{ax2}.

\begin{definition}
Let $s,i,j,r \in \N_0$ with $j \geq r$. We define the integers $b_{s,i,j,r} \in \Z$ as follows:
\begin{itemize}
 \item If $j=r=0$, then
\begin{equation} \label{206}
b_{s,i,0,0} = 1.
\end{equation}
 \item If $j \geq 1$, then
\begin{equation} \label{207}
b_{s,i,j,j} = b_{s,i,j-1,j-1} \cdot (-i+j-1).
\end{equation}
 \item If $j \geq 1$, then
\begin{equation} \label{208}
b_{s,i,j,0} = b_{s,i,j-1,0} \cdot (s+j-1).
\end{equation}
 \item If $j &gt; r \geq 1$, then
\begin{equation} \label{209}
b_{s,i,j,r} = b_{s,i,j-1,r} \cdot (s+j-1) + b_{s,i,j-1,r-1} \cdot (-i+r-1).
\end{equation}
\end{itemize}
\end{definition}

Using \eqref{205} and \cite[Thm.\ 2.5]{ax2}, we obtain the first asymptotic formula for $C_n$.

\begin{theorem} \label{t201}
For each $m \in \N$ we have
\begin{align*}
C_n &amp; = \frac{n^2}{2} \left( \log n + \log \log n - \frac{1}{2} + h_m(n) \right)\\
&amp; \p{\q\q} + \frac{n^2}{2} \sum_{s=1}^{m} \frac{(-1)^{s+1}}{s\log^sn} \sum_{i=0}^s a_{is} \left( 2(\log \log n)^i - \sum_{j=0}^{m-s}
\sum_{r=0}^{\min\{i,j\}} \frac{b_{s,i,j,r}(\log \log n)^{i-r}}{2^j\log^jn} \right) \\
&amp; \p{\q\q} + O (nc_m(n)).
\end{align*}
\end{theorem}

\begin{proof}
From \cite[Thm.\ 2.5]{ax2} we know that
\begin{align} \label{210}
\sum_{k \leq n} p_k &amp; = \frac{n^2}{2} \left( g(n) - h_m(n) + \sum_{s=1}^{m} \frac{(-1)^{s+1}}{s\log^sn} \sum_{i=0}^s a_{is} \sum_{j=0}^{m-s}
\sum_{r=0}^{\min\{i,j\}} \frac{b_{s,i,j,r}(\log \log n)^{i-r}}{2^j\log^jn} \right) \nn \\
&amp; \p{\q\q} + O (nc_m(n)),
\end{align}
where $g(n) = \log n + \log \log n - 3/2$. Now we multiply \eqref{205} by $n$ and substract \eqref{210} to get the result.
\end{proof}

\begin{corollary} \label{k202}
For each $s \in \N$ there is a unique monic polynomial $U_s$ of degree $s$ with rational coefficients, so that for every $m \in \N$
\begin{equation} \label{211}
C_n = \frac{n^2}{2} \left( \log n + \log \log n - \frac{1}{2} + \sum_{s=1}^{m} \frac{(-1)^{s+1}U_s(\log \log n)}{s\log^sn} \right) + O (nc_m(n)).
\end{equation}
In particular, $U_1(x) = x - 3/2$ and $U_2(x) = x^2-5x+15/2$.
\end{corollary}

\begin{proof}
Since $a_{ss} = 1$ and $b_{s,s,0,0} = 1$, the formula \eqref{211} follows from Theorem \ref{t201}. Now let $m=2$. Cipolla \cite{cp} showed that $a_{01}=-2$,
$a_{11}=1$, $a_{02}=11$, $a_{12} = -6$ and $a_{22}=1$. Further, we use formulae \eqref{206}--\eqref{209} to compute the integers $b_{s,i,j,r}$. Then, using
Theorem \ref{t201}, we find the polynomials $U_1$ and $U_2$.
\end{proof}

To find another asymptotic formula for $C_n$, we use the identity (see Dusart \cite[p.\ 50]{pd} or Hassani \cite[p.\ 3]{ha})
\begin{equation} \label{212}
C_n = \int_{2}^{p_{n}}{\pi(x) \, dx},
\end{equation}
which allows us to estimate $C_n$ by using explicit bounds for $\pi(x)$. Further, we use the following integration rules (see Lemma \ref{l203}), where the
{\it{logarithmic integral}} $\text{li}(x)$ is defined for every real $x \geq 2$ by
\begin{displaymath}
\text{li}(x) = \int_0^x \frac{dt}{\log t} = \lim_{\varepsilon \to 0} \left \{ \int_{0}^{1-\varepsilon}{\frac{dt}{\log t}} +
\int_{1+\varepsilon}^{x}{\frac{dt}{\log t}} \right \} \approx \int_2^x \frac{dt}{\log t} + 1.04516\ldots .
\end{displaymath}

\begin{lemma} \label{l203}
Let $r,s \in \R$ with $s \geq r &gt; 1$.
\begin{enumerate}
 \item[\emph{(i)}] $\displaystyle \int_r^s \frac{x\, dx}{\log x} = \emph{li}(s^2) - \emph{li}(r^2)$.
 \item[\emph{(ii)}] $\displaystyle \int_r^s \frac{x \, dx}{\log^2 x} = 2\, \emph{li}(s^2)-2\, \emph{li}(r^2)- \frac{s^2}{\log s} + \frac{r^2}{\log r}$.
 \item[\emph{(iii)}] If $n \in \N$, then
 \begin{displaymath}
 \int_r^s \frac{x \, dx}{\log^{n+1} x} = \frac{r^2}{n \log ^n r} - \frac{s^2}{n \log ^n s} + \frac{2}{n} \int_r^s \frac{x}{\log^{n} x} \; dx.
 \end{displaymath}
 \item[\emph{(iv)}] For every $m \in \N$ with $m \geq 2$ we have
\begin{displaymath}
\int_r^s \frac{x \, dx}{\log^m x} = \frac{2^{m-2}}{(m-1)!} \int_r^s \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} \frac{2^{m-1-k}(k-1)!}{(m-1)!} \left(
\frac{s^2}{\log^k s} - \frac{r^2}{\log^k r} \right).
\end{displaymath}
\end{enumerate}
\end{lemma}

\begin{proof}
The rules (i) and (ii) are from Dusart \cite[Lemma 1.6]{pd}. Now, (iii) follows by integration by parts and (iv) can be shown by induction on $m$.
\end{proof}

The next proposition plays an important role for the proof of the second asymptotic formula (Theorem \ref{t102}, see Introduction) for $C_n$.

\begin{proposition} \label{p204}
Let $m\in\N$ with $m \geq 2$. Let $a_2, \ldots, a_m \in \R$ and let $r,s\in\R$ with $s \geq r &gt; 1$. Then
\begin{displaymath}
\sum_{k=2}^m a_k \int_r^s \frac{x \, dx}{\log^k x} = t_{m-1,1} \int_r^s \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} t_{m-1,k} \left( \frac{s^2}{\log^k s} -
\frac{r^2}{\log^k r} \right),
\end{displaymath}
where
\begin{equation} \label{213}
t_{i,j} = (j-1)! \sum_{l=j}^{i} \frac{2^{l-j}a_{l+1}}{l!}.
\end{equation}
\end{proposition}

\begin{proof}
If $m = 2$, the claim is obviously true. By induction hypothesis, we have
\begin{displaymath}
\sum_{k=2}^{m+1} a_k \int_r^s \frac{x \, dx}{\log^k x} = t_{m-1,1} \int_r^s \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} t_{m-1,k} \left( 
\frac{s^2}{\log^k s} - \frac{r^2}{\log^k r} \right) + a_{m+1} \int_r^s \frac{x \, dx}{\log^{m+1} x}.
\end{displaymath}
By Lemma \ref{l203}(iii), we get
\begin{align*}
\sum_{k=2}^{m+1} a_k \int_r^s \frac{x \, dx}{\log^k x}&amp;  = t_{m-1,1} \int_r^s \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} t_{m-1,k} \left( 
\frac{s^2}{\log^k s} - \frac{r^2}{\log^k r} \right) + \frac{2a_{m+1}}{m} \int_r^s \frac{x \, dx}{\log^m x} \\
&amp; \p{\q\q} - \frac{a_{m+1}s^2}{m \log^m s} + \frac{a_{m+1}r^2}{m \log^m r}.
\end{align*}
Now we use Lemma \ref{l203}(iv) and the equality $t_{m-1,1} + 2^{m-1}a_{m+1}/m! = t_{m,1}$ to obtain
\begin{align*}
\sum_{k=2}^{m+1} a_k \int_r^s \frac{x \, dx}{\log^k x} &amp; = t_{m,1} \int_r^s \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} \left(
\frac{2^{m-k}a_{m+1}(k-1)!}{m!} + t_{m-1,k} \right) \left( \frac{s^2}{\log^k s} - \frac{r^2}{\log^k r} \right) \\
&amp; \p{\q\q} - \frac{a_{m+1}(m-1)!}{m!} \left( \frac{s^2}{\log^m s} - \frac{r^2}{\log^m r} \right).
\end{align*}
Since we have
\begin{displaymath}
\frac{2^{m-k}a_{m+1}(k-1)!}{m!} + t_{m-1,k} = t_{m,k}
\end{displaymath}
and $t_{m,m} = a_{m+1}(m-1)!/(m!)$, the proposition is proved.
\end{proof}

Now we are able to prove Theorem \ref{t102}.

\begin{theorem} \label{t205}
For each $m \in \N$ we have
\begin{displaymath}
C_n = \sum_{k=1}^{m-1} (k-1)! \left(1 - \frac{1}{2^k} \right) \frac{p_n^2}{\log^k p_n} + O \left( \frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
\end{theorem}

\begin{proof}
A well-known asymptotic formula for the prime counting function $\pi(x)$ is given by
\begin{equation} \label{214}
\pi(x) = \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{6x}{\log^4 x} + \ldots + \frac{(m-1)!x}{\log^m x} + O \left(
\frac{x}{\log^{m+1} x} \right).
\end{equation}
Using \eqref{214} and \eqref{212}, we get
\begin{displaymath}
C_n = \sum_{k=1}^m (k-1)! \int_2^{p_n} \frac{x \, dx}{\log^k x} + O \left( \int_2^{p_n} \frac{x \, dx}{\log^{m+1} x} \right).
\end{displaymath}
Integration by parts gives
\begin{displaymath}
C_n = \sum_{k=1}^m (k-1)! \int_2^{p_n} \frac{x \, dx}{\log^k x} + O \left( \frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
We now apply Proposition \ref{p204} to get
\begin{displaymath}
C_n = \int_2^{p_n} \frac{x \, dx}{\log x} + (2^{m-1}-1) \int_2^{p_n} \frac{x \, dx}{\log^2 x}- \sum_{k=2}^{m-1} \left( \frac{(k-1)! (2^{m-k} -
1)p_n^2}{\log^k p_n} \right) + O \left( \frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
It follows from Lemma \ref{l203}(i) and Lemma \ref{l203}(ii) that
\begin{displaymath}
C_n = (2^m - 1) \, \text{li}(p_n^2)- \sum_{k=1}^{m-1} \left( \frac{(k-1)! (2^{m-k} - 1)p_n^2}{\log^k p_n} \right) + O \left( \frac{p_n^2}{\log^m p_n}
\right).
\end{displaymath}
Now we use the well-known asymptotic formula
\begin{equation} \label{215}
\text{li}(x) = \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{6x}{\log^4 x} + \ldots + \frac{(m-1)!x}{\log^m x} + O \left(
\frac{x}{\log^{m+1} x} \right)
\end{equation}
to obtain
\begin{displaymath}
C_n = (2^m - 1)\sum_{k=1}^{m-1} \frac{(k-1)!\, p_n^2}{2^k \log^k p_n} - \sum_{k=1}^{m-1} \left( \frac{(k-1)! (2^{m-k} - 1)p_n^2}{\log^k p_n} \right) + O
\left( \frac{p_n^2}{\log^m p_n} \right)
\end{displaymath}
and the theorem is proved.
\end{proof}

Using \eqref{214}, we get the following corollary.

\begin{corollary} \label{k206}
For each $m \in \N$ we have
\begin{displaymath}
\sum_{k \leq n} p_k = \pi(p_n^2) + O \left( \frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
\end{corollary}

\begin{proof}
From Theorem \ref{t205} and the definition of $C_n$ it follows that
\begin{displaymath}
\sum_{k \leq n} p_k = np_n - \sum_{k=1}^{m-1} \frac{(k-1)!\,p_n^2}{\log^kp_n} + \sum_{k=1}^{m-1}\frac{(k-1)!\,p_n^2}{2^k\log^k p_n} + O \left(
\frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
Since $n=\pi(p_n)$, we obtain
\begin{displaymath}
\sum_{k \leq n} p_k = \pi(p_n)p_n - \sum_{k=1}^{m-1} \frac{(k-1)!\,p_n^2}{\log^kp_n} + \sum_{k=1}^{m-1}\frac{(k-1)!\,p_n^2}{2^k\log^k p_n} + O \left(
\frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
Using \eqref{214}, we get the asymptotic formula
\begin{displaymath}
\sum_{k \leq n} p_k = \sum_{k=1}^{m-1}\frac{(k-1)!\,p_n^2}{2^k\log^k p_n} + O \left( \frac{p_n^2}{\log^m p_n} \right) = \pi(p_n^2) + O \left(
\frac{p_n^2}{\log^m p_n} \right)
\end{displaymath}
and the corollary is proved.
\end{proof}

Using \eqref{214}, \eqref{215} and Corollary \ref{k206}, we obtain the following result concerning the sum of the first $n$ prime numbers.

\begin{corollary} \label{k207}
For each $m \in \N$ we have
\begin{displaymath}
\sum_{k \leq n} p_k = \emph{li}(p_n^2) + O \left( \frac{p_n^2}{\log^m p_n} \right).
\end{displaymath}
\end{corollary}

\section{A lower bound for $C_n$} \label{sec3}

Let $m \in \N$ with $m \geq 2$ and let $a_2, \ldots, a_m$, $x_0$, $y_0 \in \R$, so that
\begin{equation} \label{316}
\pi(x) \geq \frac{x}{\log x} + \sum_{k=2}^m \frac{a_kx}{\log^k x}
\end{equation}
for every $x \geq x_0$ and
\begin{equation} \label{317}
\text{li}(x) \geq \sum_{j=1}^{m-1} \frac{(j-1)! x}{\log^j x}
\end{equation}
for every $x \geq y_0$. Then, we obtain the following lower bound for $C_n$.

\begin{theorem} \label{t301}
If $n \geq \max \{ \pi(x_0) + 1, \pi(\sqrt{y_0}) + 1 \}$, then
\begin{displaymath}
C_n \geq d_0 + \sum_{k=1}^{m-1} \left( \frac{(k-1)!}{2^k} ( 1 + 2t_{k-1,1} ) \right) \frac{p_n^2}{\log^k p_n},
\end{displaymath}
where $t_{i,j}$ is defined as in \eqref{213} and $d_0$ is given by
\begin{displaymath}
d_0 = d_0(m,a_2,\ldots, a_m, x_0) = \int_2^{x_0} \pi(x) \, dx - ( 1 + 2 t_{m-1,1} )\, \emph{li}(x_0^2) + \sum_{k=1}^{m-1} t_{m-1,k} \frac{x_0^2}{\log^k
x_0}.
\end{displaymath}
\end{theorem}

\begin{proof}
Since $p_n \geq x_0$, we use \eqref{212} and \eqref{316} to obtain
\begin{displaymath}
C_n \geq \int_2^{x_0} \pi(x) \, dx + \int_{x_0}^{p_n} \frac{x \, dx}{\log x} + \sum_{k=2}^m a_k \int_{x_0}^{p_n} \frac{x \, dx}{\log^k x}.
\end{displaymath}
Now we apply Lemma \ref{l203}(i) and Proposition \ref{p204} to get
\begin{displaymath}
C_n \geq \int_2^{x_0} \pi(x) \, dx - \text{li}(x_0^2) + \text{li}(p_n^2) + t_{m-1,1} \int_{x_0}^{p_n} \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} t_{m-1,k}
\left( \frac{p_n^2}{\log^k p_n} - \frac{x_0^2}{\log^k x_0} \right).
\end{displaymath}
Using Lemma \ref{l203}(ii), we obtain
\begin{displaymath}
C_n \geq d_0 + \left( 1 + 2 t_{m-1,1} \right)\, \text{li}(p_n^2) - \sum_{k=1}^{m-1} t_{m-1,k} \frac{p_n^2}{\log^k p_n}.
\end{displaymath}
Since $p_n^2 \geq y_0$, we use \eqref{317} to conclude
\begin{displaymath}
C_n \geq d_0 + \sum_{k=1}^{m-1} \left( \frac{(k-1)!}{2^k} + \frac{(k-1)!}{2^{k-1}}\,t_{m-1,1} - t_{m-1,k} \right)\frac{p_n^2}{\log^k p_n}
\end{displaymath}
and it remains to apply the definition of $t_{ij}$.
\end{proof}

\section{An upper bound for $C_n$} \label{sec4}

Next, we derive for the first time an upper bound for $C_n$. Let $m \in \N $ with $m \geq 2$ and let $a_2, \ldots, a_m, x_1 \in \R$ so that
\begin{equation} \label{418}
\pi(x) \leq \frac{x}{\log x} + \sum_{k=2}^m \frac{a_kx }{\log^k x}
\end{equation}
for every $x \geq x_1$ and let $\la, y_1 \in \R$ so that
\begin{equation} \label{419}
\text{li}(x) \leq \sum_{j=1}^{m-2} \frac{(j-1)! x}{\log^j x} + \frac{\la x}{\log^{m-1} x}
\end{equation}
for every $x \geq y_1$. Setting
\begin{displaymath}
d_1 = d_1(m,a_2, \ldots, a_m, x_1) =  \int_2^{x_1} \pi(x) \, dx - ( 1 + 2 t_{m-1,1} ) \, \text{li}(x_1^2) + \sum_{k=1}^{m-1} t_{m-1,k}
\frac{x_1^2}{\log^k x_1},
\end{displaymath}
where $t_{m-1,k}$ is defined by \eqref{213}, we obtain the following

\begin{theorem} \label{t401}
If $n \geq \max \{ \pi(x_1) + 1, \pi(\sqrt{y_1}) + 1 \}$, then
\begin{displaymath}
C_n \leq d_1 + \sum_{k=1}^{m-2} \left( \frac{(k-1)!}{2^k} ( 1 + 2t_{k-1,1} ) \right) \frac{p_n^2}{\log^k p_n} + \left( \frac{(1 + 2t_{m-1,1})\la}{2^{m-1}} 
- \frac{a_m}{m-1} \right) \frac{p_n^2}{\log^{m-1} p_n}.
\end{displaymath}
\end{theorem}

\begin{proof}
Since $p_n \geq x_1$, we use \eqref{212} and \eqref{418} to get
\begin{displaymath}
C_n \leq \int_2^{x_1} \pi(x) \, dx + \int_{x_1}^{p_n} \frac{x \, dx}{\log x} + \sum_{k=2}^m a_k \int_{x_1}^{p_n} \frac{x \, dx}{\log^k x}.
\end{displaymath}
We apply Lemma \ref{l203}(i) and Proposition \ref{p204} to obtain
\begin{displaymath}
C_n \leq \int_2^{x_1} \pi(x) \, dx - \text{li}(x_1^2)+ \text{li}(p_n^2) + t_{m-1,1} \int_{x_1}^{p_n} \frac{x \, dx}{\log^2 x} - \sum_{k=2}^{m-1} t_{m-1,k}
\left( \frac{p_n^2}{\log^k p_n} - \frac{x_1^2}{\log^k x_1} \right).
\end{displaymath}
Using Lemma \ref{l203}(ii), we get
\begin{displaymath}
C_n \leq d_1 + ( 1 + 2 t_{m-1,1})\, \text{li}(p_n^2) - \sum_{k=1}^{m-1} t_{m-1,k} \frac{p_n^2}{\log^k p_n}.
\end{displaymath}
Now we use the inequality \eqref{419} to obtain
\begin{align*}
C_n &amp; \leq d_1 + \sum_{k=1}^{m-2} \left( \frac{(k-1)!}{2^k} + \frac{t_{m-1,1}(k-1)!}{2^{k-1}} - t_{m-1,k} \right) \frac{p_n^2}{\log^k p_n} \\
&amp; \p{\q\q} + \left(  \frac{(1 + 2t_{m-1,1})\la}{2^{m-1}} - t_{m-1,m-1} \right) \frac{p_n^2}{\log^{m-1} p_n}
\end{align*}
and it remains to apply the definition of $t_{ij}$.
\end{proof}

\section{Numerical results} \label{sec5}

\subsection{An explicit lower bound for $C_n$}

The goal of this subsection is to improve the inequality \eqref{102} in view of \eqref{104}. In order to do this, we first give two lemmata concerning
explicit estimates for $\text{li}(x)$ and $\pi(x)$, respectively.

\begin{lemma} \label{l501}
If $x \geq 4171$, then
\begin{displaymath}
\emph{li}(x) \geq \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{6x}{\log^4 x} + \frac{24x}{\log^5 x} + \frac{120x}{\log^6 x} +
\frac{720x}{\log^7 x} + \frac{5040x}{\log^8 x}.
\end{displaymath}
\end{lemma}

\begin{proof}
We denote the right hand side of the above inequality by $\alpha(x)$ and let $f(x) = \text{li}(x) - \alpha(x)$. Then, $f(4171) \geq 0.00019$ and $f'(x) =
40320/\log^9 x$, and the lemma is proved.
\end{proof}

\begin{lemma} \label{l502}
If $x \geq 10^{16}$, then
\begin{displaymath}
\emph{li}(x) \leq \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{6x}{\log^4 x} + \frac{24x}{\log^5 x} + \frac{120x}{\log^6 x} +
\frac{900x}{\log^7 x}.
\end{displaymath}
\end{lemma}

\begin{proof}
Similarly to the proof of Lemma \ref{l501}.
\end{proof}

\begin{lemma} \label{l503}
If $x \geq 1332450001$, then
\begin{displaymath}
\pi(x) &gt; \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{5.65x}{\log^4 x} + \frac{23.65x}{\log^5 x} + \frac{118.25x}{\log^6 x} +
\frac{709.5x}{\log^7 x} + \frac{4966.5x}{\log^8 x}.
\end{displaymath}
\end{lemma}

\begin{proof}
See \cite[Thm.\ 1.2]{ax}.
\end{proof}

Setting
\begin{displaymath}
\Theta(n) = \frac{43.6p_n^2}{8\log^4 p_n} + \frac{90.9p_n^2}{4\log^5 p_n} + \frac{927.5p_n^2}{8\log^6 p_n} + \frac{5620.5p_n^2}{8\log^7 p_n} +
\frac{79075.5p_n^2}{16\log^8 p_n}.
\end{displaymath}
we get the following improvement of \eqref{102}.

\begin{proposition} \label{p504}
If $n \geq 52703656$, then
\begin{displaymath}
C_n \geq \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} + \Theta(n).
\end{displaymath}
\end{proposition}

\begin{proof}
We choose $m=9$, $a_2=1$, $a_3 = 2$, $a_4=5.65$, $a_5=23.65$, $a_6 = 118.25$, $a_7 = 709.5$, $a_8 = 4966.5$, $a_9 = 0$, $x_0 = 1332450001$ and $y_0 = 4171$.
By Lemma \ref{l503}, we obtain the inequality \eqref{316} for every $x \geq x_0$ and \eqref{317} holds for every $x \geq y_0$ by Lemma \ref{l501}.
Substituting
these values in Theorem \ref{t301}, we get
\begin{displaymath}
C_n \geq d_0 + \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} + \Theta(n)
\end{displaymath}
for every $n \geq 66773605$, where $d_0 = d_0(9,1,2,5.65,23.65,118.25,709.5,4966.5,0, x_0)$ is given by
\begin{align*}
d_0 &amp; = \int_2^{x_0} \pi(x) \, dx - \frac{753.1}{3} \; \text{li}(x_0^2) + \frac{375.05 x_0^2}{3 \log x_0} + \frac{186.025 x_0^2}{3 \log^2 x_0} +
\frac{183.025 x_0^2}{3 \log^3 x_0} + \frac{88.6875x_0^2}{\log^4 x_0} \\
&amp; \p{\q\q} + \frac{165.55x_0^2}{\log^5 x_0} + \frac{354.75x_0^2}{\log^6 x_0} + \frac{709.5x_0^2}{\log^7 x_0}.
\end{align*}
Since $x_0^2 \geq 10^{16}$, it follows from Lemma \ref{l502} that
\begin{align*}
d_0 &amp; \geq \int_2^{x_0} \pi(x) \, dx - \frac{x_0^2}{2 \log x_0} - \frac{3 x_0^2}{4 \log^2 x_0} - \frac{7 x_0^2}{4 \log^3 x_0} - \frac{5.45x_0^2}{\log^4 x_0}
- \frac{22.725 x_0^2}{ \log^5 x_0} \\
&amp; \p{\q\q} - \frac{115.9375x_0^2}{\log^6 x_0} - \frac{1055.578125x_0^2}{\log^7 x_0}.
\end{align*}
Using $\log x_0 \geq 21.01027$, we get
\begin{align} \label{520}
d_0 &amp; \geq \int_2^{x_0} \pi(x) \, dx - 4.22512933 \cdot 10^{16} - 0.30164729 \cdot 10^{16} - 0.03349997 \cdot 10^{16} \nn \\
&amp; \p{\q\q} - 0.0049656 \cdot 10^{16} - 0.00098548 \cdot 10^{16} - 0.0002393 \cdot 10^{16} - 0.0001037 \cdot 10^{16} \nn \\
&amp; = \int_2^{x_0} \pi(x) \, dx - 4.56657067 \cdot 10^{16}.
\end{align}
Since $x_0 = p_{66773604}$, we use \eqref{212} a computer to obtain
\begin{displaymath}
\int_2^{x_0} \pi(x) \, dx = C_{66773604} = 45665745738169817.
\end{displaymath}
Hence, by \eqref{520}, we get $d_0 \geq 3.9 \cdot 10^{10} &gt; 0$. So we obtain the asserted inequality for every $n \geq 66773605$. For every $52703656 \leq
n \leq 66773604$ we check the inequality with a computer.
\end{proof}

\subsection{An explicit upper bound for $C_n$}

We begin with the following two lemmata.

\begin{lemma} \label{l505}
If $x \geq 10^{18}$, then
\begin{displaymath}
\emph{li}(x) \leq \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{6x}{\log^4 x} + \frac{24x}{\log^5 x} + \frac{120x}{\log^6 x} +
\frac{720x}{\log^7 x}  + \frac{6300x}{\log^8 x}.
\end{displaymath}
\end{lemma}

\begin{proof}
Similarly to the proof of Lemma \ref{l501}.
\end{proof}

\begin{lemma} \label{l506}
If $x &gt; 1$, then
\begin{displaymath}
\pi(x) &lt; \frac{x}{\log x} + \frac{x}{\log^2 x} + \frac{2x}{\log^3 x} + \frac{6.35x}{\log^4 x} + \frac{24.35x}{\log^5 x} + \frac{121.75x}{\log^6 x} +
\frac{730.5x}{\log^7 x} + \frac{6801.4x}{\log^8 x}.
\end{displaymath}
\end{lemma}

\begin{proof}
See \cite[Thm.\ 1.1]{ax}.
\end{proof}

Using these upper bounds, we obtain the following explicit upper bound for $C_n$, where
\begin{displaymath}
\Omega(n) = \frac{46.4p_n^2}{8\log^4 p_n} +  \frac{95.1p_n^2}{4\log^5 p_n} + \frac{962.5p_n^2}{8\log^6 p_n} + \frac{5809.5p_n^2}{8\log^7 p_n} +
\frac{118848p_n^2}{16\log^8 p_n}.
\end{displaymath}

\begin{proposition} \label{p507}
For every $n \in \N$,
\begin{displaymath}
C_n \leq \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} + \Omega(n).
\end{displaymath}
\end{proposition}

\begin{proof}
We choose $a_2=1$, $a_3=2$, $a_4=6.35$, $a_5=24.35$, $a_6=121.75$, $a_7=730.5$, $a_8=6801.4$, $\lambda=6300$, $x_1 = 11$ and $y_1 = 10^{18}$. By
Lemma \ref{l506}, we get that the inequality \eqref{418} holds for every $x \geq x_1$ and by Lemma \ref{l505}, that \eqref{419} holds for all $y \geq y_1$.
By substituting these values in Theorem \ref{t401}, we get
\begin{equation} \label{521}
C_n \leq d_1 + \frac{p_n^2}{2 \log p_n} + \frac{3p_n^2}{4 \log^2 p_n} + \frac{7p_n^2}{4 \log^3 p_n} +  \Omega(n) - \frac{0.875p_n^2}{16 \log^8 p_n}
\end{equation}
for every $n \geq 50847535$, where $d_1 = d_1(9,1,2,6.35,24.35,121.75,730.5,6801.4,0, x_1)$ is given by
\begin{align*}
d_1 &amp; = \int_2^{x_1} \pi(x) \, dx - \frac{950777}{3150} \; \text{li}(x_0^2) + \frac{947627 x_0^2}{6300 \log x_0} + \frac{941327 x_0^2}{12600 \log^2 x_0} +
\frac{928727 x_0^2}{12600 \log^3 x_0} \\
&amp; \p{\q\q} + \frac{902057 x_0^2}{8400 \log^4 x_0} + \frac{425461 x_0^2}{2100 \log^5 x_0} + \frac{187163 x_0^2}{420 \log^6 x_0} + \frac{34007 x_0^2}{35\log^7
x_0}.
\end{align*}
Since $\text{li}(x_1^2) \geq 34.59$ and $\log x_1 \geq 2.39$, we obtain $d_1 \leq 450$. We define
\begin{displaymath}
f(x) = \frac{0.875x^2}{16\log^8 x} - 450.
\end{displaymath}
Since $f(6\cdot 10^6) \geq 109$ and $f'(x) \geq 0$ for every $x \geq e^4$, we get $f(p_n) \geq 0$ for every $n \geq \pi(6 \cdot 10^6) + 1 = 412850$. Now we
can use \eqref{521} to obtain the desired inequality for every $n \geq 50847535$. For every $ 1 \leq n \leq 50847534$ a computer makes the rest of work.
\end{proof}

\begin{thebibliography}{9}
\bibitem{ax} C. Axler, New bounds for the prime counting function $\pi(x)$,
preprint, 2015.   Available at \url{http://arxiv.org/abs/1409.1780}.
\bibitem{ax2} C. Axler, On the sum of the first $n$ prime numbers, preprint,
2014. Available at \url{http://arxiv.org/abs/1409.1777}.
\bibitem{cp} M. Cipolla, La determinazione assintotica dell' $n^{imo}$ numero primo, {\it Rend. Accad. Sci. Fis. Mat. Napoli} \textbf{8} (1902), 132--166.
\bibitem{pd} P. Dusart, Autour de la fonction qui compte le nombre de nombres premiers, Dissertation, Universit\'{e} de Limoges, 1998.
\bibitem{ha} M. Hassani, A remark on the Mandl's inequality, preprint,
2006.  Available at \url{http://arxiv.org/abs/math/0606765}.
\bibitem{pol} N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences, \url{http://oeis.org}.
\bibitem{rs} J. B. Rosser and L. Schoenfeld, Sharper bounds for the Chebyshev functions $\theta(x)$ and $\psi(x)$, {\it Math. Comp.} \textbf{29} (1975),
243--269.
\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11A41; Secondary 11B83, 11N05.

\noindent \emph{Keywords: }
asymptotic formula, Mandl's inequality, prime number.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences 
\seqnum{A000040},
\seqnum{A007504},
\seqnum{A124478}, and
\seqnum{A152535}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received March 19 2015;
revised versions received March 23 2015; June 19 2015; July 10 2015; 
July 13 2015.
Published in {\it Journal of Integer Sequences}, July 16 2015.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}
</pre></body></html>