\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}


\begin{center}
\vskip 1cm{\LARGE\bf On the Sum of the Reciprocals of the  \\
\vskip .05in
Middle Prime Factors of an Integer}  \vskip 1cm
\large
Vincent Ouellet\\
D\'{e}partement de math\'{e}matiques et de statistique\\
Universit\'{e} Laval\\
Qu\'{e}bec G1V 0A6\\
Canada\\
\href{mailto:vincent.ouellet.7@ulaval.ca}{\tt vincent.ouellet.7@ulaval.ca} 
\\
\end{center}

\vskip .2 in


\begin{abstract}
We consider the arithmetical function
$p^{\left(\beta\right)} (n) : = p_{\max\left(1,\left\lfloor \beta 
k\right\rfloor\right)}$ for a given fixed number 
$\beta\in\left(0,1\right)$, where
$p_1 < p_2 < \cdots < p_k$ are the prime factors of $n$. We 
provide an estimate for the sum of the reciprocals of 
$p^{\left(\beta\right)} (n)$ for $n\leq x$, which improves and
generalizes an 
earlier result of De Koninck and Luca.
\end{abstract}

\section{Introduction}
Given an integer $n\geq 2$, let $P(n)$ denote its largest prime
factor and let $P(1)=1$. At the end of the 1970's and early 
1980's, many papers focused on estimating the global behavior of 
the sum of the reciprocals of $P(n)$ for $n\leq x$. For the highlights, 
see the papers of Erd\H{o}s and Ivi\'{c}
\cite{MR681439} and~\cite{MR710969}. The best estimate was obtained in 
1986 by Erd\H{o}s, Ivi\'{c}, and Pomerance~\cite[Thm.\ 1]{MR896810}, as 
they proved that
\[
\sum\limits_{n\leq x}\frac{1}{P(n)} 
= 
x \int_2^x \rho\left(\frac{\log x}{\log 
t}\right)t^{-2}\mathrm{d}t\left(1+O\left(
\sqrt{\frac{\log_2 x}{\log x}}\right)\right) \qquad \left(x\rightarrow
\infty\right),
\]
where $\rho\left(u\right)$ is the Dickman function and $\log_k 
x$ denotes the $k$-th iterate of $\log$ evaluated at $x$. Here
and in what follows, we shall assume that the input $x$ in
such an expression is sufficiently large so that the iterated
logarithms are real and positive.
For any integer $k\geq 2$,
letting $P_k (n)$ stand for the $k$-th largest prime factor
with multiplicity of the 
integer $n$, De Koninck~\cite[Thm.\ 2]{MR1239141} proved that 
there exists a constant $c_k$ such that
\[
\sum\limits_{\substack{n\leq x \\ \Omega(n)\geq k}} \frac{1}{P_k 
(n)}
= 
c_k \frac{x\left(\log_2 x \right)^{k-2}}{\log x}\left(1+O\left(
\frac{1}{\log_2 x}\right)\right) \qquad \left(x\rightarrow\infty\right),
\]
where $\Omega(n)$ stands for the number of prime factors of $n$ 
counting multiplicities.

During the 1984 Oberwolfach Conference on Analytic Number Theory,
Erd\H{o}s asked De Koninck if he had thought of
estimating the sum of the reciprocals of the middle prime factors
of the positive integers $n\leq x$. Given an integer $n\geq 2$, write it 
as $n= p_1^{a_1}p_2^{a_2}\cdots p_{k}^{a_k}$, where  $p_1<p_2 < 
\cdots < p_k$ are its distinct prime factors, and the $a_i$ are 
positive integers. Denote the number of distinct prime factors of $n$ by 
$\omega(n)$, so that $\omega\left(n\right)=k$, and 
let
$p^{(m)}(n) := p_{\left\lfloor \frac{\omega(n)+1}{2}\right\rfloor}$ 
denote its middle prime factor. De Koninck and 
Luca~\cite{MR3065334} proved that, as $x\rightarrow\infty$,
\begin{equation}
\label{dknluca}
\sum\limits_{1<n\leq x}\frac{1}{p^{(m)} (n)} 
= 
\frac{x}{\log x}
\exp\left(\left(\sqrt{2}+o(1)\right)\sqrt{\log_2 x \log_3 
x}\right).
\end{equation}

Expanding the main ideas of the proof of the upper bound given 
by De Koninck and Luca~\cite{MR3065334}, our goal here is to improve and 
generalize equation
(\ref{dknluca}).
For an integer $n\geq 2$ and a fixed real number $\beta\in\left(0,1\right)
$, we denote by $p^{\left(\beta\right)}(n) = p_{\max\left(1, 
\left\lfloor \beta k \right\rfloor\right)}$ the 
$\beta$-\textit{positioned
prime factor} of $n$, where $p_1 < p_2 < \cdots < p_k$ are its prime
factors.
As De Koninck and Luca did with the middle prime factor, we
obtain an estimate for the sum of the reciprocals
of the $\beta$-positioned prime factors of the integers $n\leq x$.
\begin{theorem}
\label{primaryresult}
There exist four constants $\alpha_1$, 
$\alpha_2$, $\alpha_3$, and $\alpha_4$ such that, as $x\rightarrow\infty$,
\begin{equation}
\label{result}
\sum\limits_{1<n\leq x}\frac{1}{p^{\left(\beta\right)}(n)} 
= 
\frac{x}{\log x}\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_3 x\right)^{\beta}}{\beta^{\beta}\left(1-\beta
\right)^{1-2\beta}}\left(G\left(x, 
\beta\right)  + O\left(\frac{1}
{\log_3^2 x}\right)\right)\right),
\end{equation}
where $
G\left(x,\beta\right) 
=
1+ \alpha_1 \frac{\log_4 x}{\log_3 x} + \alpha_2
\frac{1}{\log_3 x} + \alpha_3 \frac{\log_4^2 x}{\log_3^2 x}
+\alpha_4 \frac{\log_4 x}{\log_3^2 x}$. In particular,
\begin{alignat*}{2}
\alpha_1 
&= 
\frac{-\beta \left(2-\beta\right)}{1-\beta}, &&\alpha_3 = \frac{2-\beta}
{2}\alpha_1 , \\ \alpha_2 
&= 
\beta\left(\log \beta - \frac{3-2\beta}{1-\beta}
\log\left(1-\beta\right) - \frac{1}{1-\beta}\right), \qquad 
&&\alpha_4 =\left(2-\beta\right)\alpha_2 - \alpha_1 + \frac{\beta}
{1-\beta}.
\end{alignat*}
\end{theorem}

By setting $\beta = 1/2$, the following corollary shows that 
\eqref{result}
is an improvement over equation (\ref{dknluca}).

\bigbreak

\begin{corollary}
As $x\rightarrow\infty$,
\begin{align*}
\sum\limits_{1<n\leq x}\frac{1}{p^{\left(m\right)}(n)} 
&=
\frac{x}{\log x}\exp\left(\sqrt{2\log_2 x \log_3 x}
\left(1 + c_1 \frac{\log_4 x}{\log_3 x} + \frac{c_2}{\log_3 x}
+ c_3 \frac{\log_4^2 x}{\log_3^2 x} + c_4 \frac{\log_4 x}{\log_3^2 x}
\right)\right)\\
& \qquad \qquad
\times \exp\left(O\left(\sqrt{\frac{\log_2 x}{\log_3^3 x}}\right)\right),
\end{align*}
where $c_1 = \frac{-3}{2}$, $c_2 = \frac{3}{2}\log 2 - 1$, $c_3 =
\frac{-9}{8}$, and $c_4 = 1 + \frac{9}{4}\log 2$.
\end{corollary}

\section{Preliminary results}
Throughout this paper, $p$ and $q$ always stand for prime numbers,
$\beta\in\left(0,1\right)$ is a fixed real number, and $x$ is a large 
number. 
Our goal is to estimate
\begin{equation}
\label{prelsum}
\sum\limits_{1<n\leq x} \frac{1}{p^{\left(\beta\right)}(n)}
= \sum\limits_{p\leq x} \frac{1}{p} \#\left\{
n\leq x : p^{\left(\beta\right)}(n) = p\right\}
=
\sum\limits_{p\leq x}\frac{1}{p}\sum\limits_{k\geq 1}
\# \mathcal{N}_{p,k}(x),
\end{equation}
where $\mathcal{N}_{p,k}(x) := \left\{n\leq x : p^{\left(\beta\right)}
(n) = p, \omega(n) = k\right\}$. Note that, given any $x$, the sum over $k
$ is finite since the integer $k$ must satisfy $k\leq \left\lfloor 
\frac{\log x}{\log 2} \right\rfloor$. Moreover, it is possible  that
$\#\mathcal{N}_{p,k}(x) = 0$ for some primes $p$ and integers $k$. Hence, 
the integers $k$
and prime numbers $p$ are dependent.
We shall see that the main contribution to equation
(\ref{prelsum}) is reached when the prime numbers $p$ and the integers
$k$ are in particular sets.
Let
\begin{align*}
\mathcal{N}_1 (x) 
&:=
\left\{n\leq x : \Omega(n)>10\log_2 x\right\};\\
\mathcal{N}_2 (x) 
&:=
\left\{n \leq x : p_\beta (n) > \log x\right\};\\
\mathcal{N}_3 (x) 
&:=
\left\{n\leq x : \omega(n) \in \left\{ 1, 2, \ldots, M\right\}\right\};\\
\mathcal{N}_4 (x) 
&:=
\left\{n\leq x \right\}\setminus\left(\mathcal{N}_1 (x) \cup 
\mathcal{N}_2 (x) \cup \mathcal{N}_3(x)\right),
\end{align*}
where $M:= \left\lceil \max\left(\frac{2}{\beta}, \frac{2}{1-\beta}\right)
\right\rceil$.
We first show that
\begin{equation}
\label{preleq1}
\sum\limits_{n\in \mathcal{N}_i (x)}\frac{1}{p^{\left(\beta\right)} (n)}
\ll \frac{x \left(\log_2 x\right)^{M-1}}{\log x} \qquad 
\mbox{ for }i=1,2,3.
\end{equation}
By \cite[Lemma 13]{MR2337059}, it follows that
\begin{equation}
\label{N1}
\sum\limits_{n\in\mathcal{N}_1 (x)} \frac{1}{p^{\left(\beta\right)} (n)}
\ll 
\#\mathcal{N}_1 (x) = \sum\limits_{\substack{n\leq x \\
\Omega(n) >10\log_2 x}}1 \ll x\log x \ \frac{10\log_2 x}
{2^{10\log_2 x}} \ll \frac{x}{\left(\log x\right)^5}.
\end{equation}
For the integers $n\in\mathcal{N}_2 (x)$, we have
\begin{equation}
\label{N2}
\sum\limits_{n\in\mathcal{N}_2 (x)}\frac{1}{p^{\left(\beta\right)} (n)}
\leq \sum\limits_{n\leq x} \frac{1}{\log x} \leq \frac{x}
{\log x}.
\end{equation}
Finally,
\begin{equation}
\label{N3}
\sum\limits_{n\in\mathcal{N}_3 (x)}\frac{1}{p^{\left(\beta\right)} (n)}
\ll \#\mathcal{N}_3 (x) \ll \frac{x\left(\log_2 x\right)^{M-1}}{\log x},
\end{equation}
by the Hardy-Ramanujan inequality (see 
Lemma~\ref{lemmahardyramanujan}). Hence, combining the bounds 
(\ref{N1}), (\ref{N2}) and (\ref{N3}), the upper bound (\ref{preleq1}) 
follows.

For each integer $n\in\mathcal{N}_{p,k}(x)\cap \mathcal{N}_4 (x)$,
we write $\omega(n) = k = \frac{1}{\beta}k_0 + \delta$, where
$k_0 = \left\lfloor \beta k \right\rfloor$, so that $\delta\in\left[0,
\frac{1}{\beta}\right)$
is fixed. Note that $k \in \left[M+1, 10\log_2 x\right]$ and that $p\in 
\left[2, \log x\right]$.
Let us write
$n=ap^\alpha b$,
where $a\geq 2$, $P(a)<p$, $\omega(a) = k_0 -1$, $1\leq \alpha \leq 10
\log_2 x$, $p(b)>p$, and $\omega(b) =
\left(\frac{1}{\beta}-1\right)k_0 + \delta$, where $P(n)$ and $p(n)$
denote respectively the largest and the smallest prime factors of $n$.
It follows from the bounds (\ref{N1}) and (\ref{N3}) that
\begin{equation}
\label{preleq3}
\sum\limits_{n\in\mathcal{N}_4 (x)}\frac{1}{p^{\left(\beta\right)} (n)}
= \sum\limits_{p\in\left[3,\log x\right]}\frac{1}
{p}\sum\limits_{k\in\left[M+1,
10\log_2 x\right]}
\#\left(\mathcal{N}_{p,k}(x) \cap \mathcal{N}_4 (x)\right) 
+ O\left(\frac{x\left(\log_2 x\right)^{M-1}}{\log x
}\right),
\end{equation}
where $p\geq 3$ comes from the fact that $a\geq 2$. Note that
the $\beta$-positioned prime factors of some integers $n$ that
are in the sets $\mathcal{N}_i(x)$ for $i=1, 2, 3$ are counted
multiple times on the right-hand side of (\ref{preleq3}),
but that their contribution is taken into consideration by the error term 
of equation
(\ref{preleq3}). The objective is now to estimate the main term of 
equation (\ref{preleq3}). For this, three preliminary results will be 
useful.
\begin{lemma}[Alladi~\cite{MR657120}, Theorem 6]
\label{lemmaalladi}
Given a positive integer $\lambda$,
let 
\[
\omega_\lambda (x,y):= \# \left\{n\leq x : p(n)\geq y, 
\omega(n)=\lambda
\right\}
\]
and
\[
g\left(s,y,z\right):= \prod\limits_p \left(1+\frac{z}
{p^s - 
1}\right)\left(1-\frac{1}{p^s}\right)^z\prod\limits_{p<y}\left(1+
\frac{z}{p^s - 1}\right)^{-1} 
\]
for each $z\in\mathbb{C}$.
Then, for any $r>0$, in the range
$2 \leq y \leq \exp\left(\left(\log x\right)^{2/5}\right)$, 
$\Re(s) > \frac{1}{2}$ and
$
\lambda \leq r \log_2 x$, we
have
\[
\omega_\lambda \left(x,y\right) 
= \frac{x}{\log x} \frac{g\left(1,y,
\mu\right)}{\Gamma\left(1+\mu\right)} \frac{\left(\log_2 
x\right)^{\lambda-1}}{
\left(\lambda-1\right)!}
+ O\left(\frac{x\left(\log_2 x\right)^{\lambda-1}\left(\log y
\right)^{-\mu} \left(\log_2 y\right)^2 \lambda}{
\left(\lambda-1\right)! \log x \left(\log_2 x\right)^2} \right) \quad 
\left(x\rightarrow\infty\right),
\]
where $\mu := \frac{\lambda -1}{\log_2 x}$.
\end{lemma}
Lemma~\ref{lemmaalladi} and the following lemmas are used to estimate the 
sum over $b$ for the integers $n=ap^{\alpha}b$.
\begin{lemma}[Hardy-Ramanujan inequality]
\label{lemmahardyramanujan}
For any integer $\lambda\geq 1$, define
\[
\Pi_{\lambda} (x) = \#\left\{n\leq x : \omega(n) = 
\lambda\right\}.
\]
There exist positive constants $c$ and $x_0$ such that, 
uniformly for $1\leq \lambda \leq 10\log_2 x$,
\[
\Pi_\lambda (x) \leq c\frac{x}{\log x} \frac{\left(\log_2 
x\right)^{\lambda-1}}
{\left(\lambda-1\right)!}
\]
for all $x>x_0$.
\end{lemma}
The next lemma follows from the proof of Theorem 1 in Erd\H{o}s
and Tenenbaum~\cite{MR1014865}. It will be used to
obtain an estimate for the sum over $a$ of the integers
$n=ap^{\alpha}b \leq x$.
\begin{lemma}[Erd\H{o}s and Tenenbaum]
\label{lemmaerdostenenbaum}
Let $\epsilon >0$. For every prime number $p\geq 5$, 
define the function $\rho=\rho\left(k_0 -1, p\right)$ as the unique 
solution to
$
\sum\limits_{q<p}\frac{\rho}{q-1+\rho} = k_0-1
$
for $1\leq k_0 -1 \leq \pi(p)-2$, and define the functions 
$$
w(t) = \begin{cases}
\Gamma\left(t+1\right)t^{-t}e^t, &\text{ if $t>0$};\\ 
1, & \text{if $t=0$}; 
\end{cases}
$$
and 
$$
F\left(z,p\right)=\prod\limits_{q<p}\left(1+\frac{z}{q-1}\right)
$$
for $z\in\mathbb{C}$. Moreover, let
$
\mathcal{G}:=\left\{a\in\mathbb{N}:\omega(a) = k_0-1, 
P(a)<p\right\}$.
Then, uniformly for $1\leq k_0 \leq p^{1-\epsilon}$,
we have
\[
\sum\limits_{a\in \mathcal{G}}\frac{1}{a} = 
\frac{F\left(\rho,p\right)}
{\rho^{k_0-1}w\left(
k_0-1\right)}\left(1+O\left(R^{-1}\right)\right),
\]
where $R = \log\left(\frac{\log p}
{\log\left(k_0+1\right)}\right)\left(1+\log^+\left(\frac{k_0}
{\log\left(\frac{\log p}{\log\left(k_0+1\right)
}\right)}\right)\right)$ and $\log^+ x:= \max\left(0, \log x\right)$.
\end{lemma}
In the following lemmas, we study three functions that
are used to estimate the main term of the right-hand side of equation 
(\ref{preleq3}).
\begin{lemma}
\label{function1}
Let $B>1$ and define the function $f:\left(0,\infty\right)
\rightarrow \left(0,\infty\right)$ by
$
f(t) = \left(\frac{eB}{t}\right)^t
$.
The function $f$ is concave and reaches its maximum when $t=B$.
\end{lemma}
\begin{definition}
For $x>-\frac{1}{e}$, we define the \textit{Lambert-W function} 
as the inverse of the
real-valued function $h(y)=ye^y$, which 
is defined for $y>-1$, so that $
W(x) e^{W(x)}=x$.
\end{definition}
In particular, one can easily show that the Lambert-W function goes to 
$\infty$ as $x\rightarrow\infty$, that it is strictly 
increasing and that it goes to $0$ as $x\rightarrow 0$. Using these
facts, the following lemmas can be proved.
\begin{lemma}
\label{eqlambert}
As $x\rightarrow\infty$,
\[
W(x) = \log x - \log_2 x + \frac{\log_2 x}{\log x} + O\left(
\left(\frac{\log_2 x}{\log x}\right)^2\right).
\]
\end{lemma}
\begin{lemma}
\label{eqlambert2}
As $x\rightarrow 0$,
\[
W(x) = x + O\left(x^2\right).
\]
\end{lemma}
The third function will be useful in the evaluation of
some sums.
\begin{lemma}
\label{function2}
Let $D>0$ and $C\in\mathbb{R}$, and
define the function $g:\left(e^{C},\infty\right)\rightarrow 
\left(0, \infty\right)$ by\\
$
g(t) = \exp\left(\frac{D}{\beta}\left(\log t - C\right)^\beta-
t\right)$.
The function $g$ is concave and reaches its maximum when
\[
\log t = \log t_0 := \left(1-\beta\right)W\left(\frac{D^{\frac{1}
{1-\beta}}}
{1-\beta}\exp\left(\frac{-C}{1-\beta}\right)\right) + C,
\]
where $W$ stands for the Lambert-W function.
\end{lemma}
\begin{proof}
Clearly,
\begin{align*}
g^\prime (t) = 0 
&\iff
 \frac{D}{t\left(\log t - C
\right)^{1-\beta}} - 1 = 0
\iff 
D = t \left(\log t - C\right)^{1-\beta}\\
&\iff
D^{\frac{1}{1-\beta}} = t^{\frac{1}{1-\beta}}
\left(\log t - C\right)
\iff
D^{\frac{1}{1-\beta}} = \exp\left(\frac{\log t}{1-\beta}\right)
\left(\log t - C\right)\\
&\iff 
\frac{D^{\frac{1}{1-\beta}}\exp\left(\frac{-C}
{1-\beta}\right)}{1-\beta} = \exp\left(\frac{\log t - C}{1-\beta}
\right)\left(\frac{\log t - C}{1-\beta}\right).
\end{align*}
Hence, by the definition of the Lambert-W function, it follows 
that this last equation is equivalent to
$
\frac{\log t - C}{1-\beta}= W\left(\frac{D^{\frac{1}{1-\beta}}}{
1-\beta}\exp\left(\frac{-C}{1-\beta}\right)\right)
$.
Since $t> e^{C}$, this equation always has a unique solution.
\end{proof}

\section{Estimation of the main term}
We will now consider the primes $p$ belonging to the interval
\begin{equation}
\label{I}
I := \left[\exp\left(\left(\frac{\log_2 x}{\left(\log_3 x
\right)^{\frac{4}{1-\beta}}\log_4 x}\right)^{1-\beta}\right),
\exp\left(\left(\log_2 x\right)^{1-\beta}\log_3 x\right)\right]
\end{equation}
and the positive integers $k$ belonging to the interval
\begin{equation}
\label{J}
J := \left[ \frac{1}{4}
\frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_3 x\right)^\beta}{\beta^{\beta}\left(1-\beta
\right)^{1-3\beta}}, 
2e \frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_3 x\right)^\beta}{\beta^{\beta}\left(1
-\beta\right)^{1-\beta}}
\right].
\end{equation}
We will show that the main contribution to the right-hand side of equation
(\ref{preleq3}) comes from the primes
$p\in I$ and integers $k\in J$. Note that $\#
\mathcal{N}_{p,k}(x) \neq 0$ for any prime number $p\in I$ and integer $k
\in J$.
Let
\begin{equation}
\label{defsetA}
\mathcal{A} = \mathcal{A}\left(k,p\right):=\left\{a\in\mathbb{N} : 
\omega(a)=k_0 -1, P(a)<p
\mbox{ and }\Omega(a)\leq 10\log_2 x\right\}
\end{equation}
and
\begin{equation}
\label{defsetB}
\mathcal{B}=\mathcal{B}\left(k,p\right):=\left\{b\in\mathbb{N} : \omega(b) 
= 
\left(\frac{1}
{\beta}-1\right)k_0 + \delta \mbox{ and }p(b)>p\right\},
\end{equation}
so that $n=ap^\alpha b\in \mathcal{N}_4 (x)$ for $a\in\mathcal{A}$
and $b\in\mathcal{B}$. Hence, for $p\in I$ and $k\in J$, we have
 from the upper bound (\ref{N1}) that
\begin{equation}
\label{Npk0}
\#\left(\mathcal{N}_{p,k}(x) \cap \mathcal{N}_4 (x)\right)
 = \sum\limits_{\substack{a\leq x\\ a
\in \mathcal{A}}}\sum\limits_{\alpha = 1}^{\left\lfloor 10\log_2 x
\right\rfloor}
\sum\limits_{\substack{b\leq \frac{x}{ap^\alpha}\\b\in\mathcal{B}}
}1 + O\left(\frac{x}{\left(\log x\right)^5}\right).
\end{equation}
Thus, it follows from equation (\ref{preleq3}) that
\begin{equation}
\label{sumN4}
\sum\limits_{\substack{n\in \mathcal{N}_4 (x)\\ p^{\left(\beta\right)}(n)
\in I\\ \omega(n) \in J}} \frac{1}{p^{\left(\beta\right)}(n)}
= \sum\limits_{p\in I} \frac{1}{p} \sum\limits_{k\in J}
\sum\limits_{\substack{a\leq x\\ a\in\mathcal{A}}} \sum\limits_{\alpha=1}
^{\left\lfloor 10 \log_2 x\right\rfloor} \sum\limits_{\substack{
b\leq \frac{x}{ap^{\alpha}}\\ b \in \mathcal{B}}} 1
+ O\left(\frac{x \left(\log_2 x\right)^{M-1}}{\log x}\right).
\end{equation}
It remains to estimate the sums in the right-hand side of (\ref{sumN4}).
Let 
\[
\#\mathcal{N}_{p,k}^{\prime}(x) := \sum\limits_{\substack{a\leq x\\ 
a\in\mathcal{A}}} \sum\limits_{\alpha=1}^{
\left\lfloor 10 \log_2 x\right\rfloor} \sum\limits_{\substack{
b\leq \frac{x}{ap^{\alpha}}\\ b \in \mathcal{B}}} 1.
\]
Since
$ap^\alpha = x^{o(1)}$, we obtain from Lemma~\ref{lemmaalladi} that
\[
\sum\limits_{\substack{b\leq\frac{x}{ap^\alpha}\\b\in\mathcal{B}}
}1 = v_\lambda \left(\frac{x}{ap^\alpha},p+2\right) =
\frac{x}{ap^\alpha \log x}\frac{\left(\log_2 x\right)^{
\lambda-1}}{\left(\lambda-1\right)!}\left(1+o(1)\right)
\qquad \left(x\rightarrow\infty\right),
\]
where $\lambda = \left(\frac{1}{\beta}-1\right)k_0 + \delta \geq 2$, 
because $k\geq M+1$.
Hence, as $x\rightarrow\infty$,
\begin{equation}
\label{Npk1}
\#\mathcal{N}_{p,k}^{\prime}(x) \sim \frac{x}{p \log x}
\frac{\left(\log_2 x\right)^{\lambda-1}}{\left(\lambda-1\right)!}
\sum\limits_{\substack{a\leq x\\ a\in\mathcal{A}}}\frac{1}{a}
\sum\limits_{\alpha=1}^{\left\lfloor 10\log_2 x \right\rfloor} \frac{1}
{p^{\alpha-1}}
\sim\frac{x}{p \log x}
\frac{\left(\log_2 x\right)^{\lambda-1}}{\left(\lambda-1\right)!}
\sum\limits_{a\in\mathcal{A}}\frac{1}{a},
\end{equation}
because $a=x^{o(1)}$ for all $a\in \mathcal{A}$. Moreover, we have
$
\sum\limits_{a\in\mathcal{A}}\frac{1}{a} \sim \sum\limits_{a\in
\mathcal{G}}
\frac{1}{a}
$
as $x\rightarrow\infty$, where the set $\mathcal{G}$ is defined
as in Lemma~\ref{lemmaerdostenenbaum}.
Indeed, we have
\[
\sum\limits_{a\in\mathcal{G}}\frac{1}{a}=\sum\limits_{a\in 
\mathcal{A}}\frac{1}{a} + \sum\limits_{\substack{a\in\mathcal{G} 
\\ \Omega(a)>10\log_2 x}}\frac{1}{a},
\]
and Rankin's method (see, for example, \cite[Chap.~9]{MR3065334}) 
shows that 
$
\sum\limits_{\substack{n> x\\ P(n) < y}} \frac{1}{n}
\ll e^{-u/2} \log y$
for any $x\geq y \geq 2$, where $u = \frac{\log x}{\log y}$. Hence,
it follows that
\[
\sum\limits_{\substack{a\in\mathcal{G}\\ \Omega(a)>10\log_2 x}}\frac{1}{a}
\leq \sum\limits_{\substack{a>2^{10\log_2 x}\\ P(a)<p}} 
\frac{1}{a} \ll \exp\left(-\frac{5\log_2 x \log 2}{\log p}
\right)\log p.
\]
We get from equation (\ref{Npk1}) that
\[
\#\mathcal{N}_{p,k}^{\prime}(x) \sim \frac{x}{p\log x}\frac{\left(\log_2 x
\right)^{\lambda - 1}}{\left(\lambda 
-1\right)!}\sum\limits_{a\in\mathcal{G}}
\frac{1}{a}
\]
as $x\rightarrow\infty$.
By an explicit evaluation of $\sum\limits_{a\in\mathcal{G}}
\frac{1}{a}$ using Lemma~
\ref{lemmaerdostenenbaum},
we obtain
\begin{equation}
\label{Npk2}
\#\mathcal{N}_{p,k}^{\prime}(x)= \frac{x}{p \log x}
\frac{\left(\log_2 x\right)^{\lambda-1}}{\left(\lambda-1\right)!}
\left(\frac{eA}{k_0}\right)^{k_0}\mathcal{R},
\end{equation}
where $A=A(x,p)=\log_2 p - \log_4 x - \log\left(1-\beta\right)
+\frac{\log_4 x}{\log_3 x}$ and 
\[
\mathcal{R}=\mathcal{R}(x)=\exp\left(O\left(\frac{\left(
\log_2 x\right)^{1-\beta}}{\left(\log_3 x\right)^{2-\beta}}\right)
\right).
\]
Indeed, following the proof of Erd\H{o}s and 
Tenenbaum~\cite[Lemma 1]{MR1014865},
for any prime number $p\in I$ and integer $k
\in J$, we have
\begin{align}
\label{estrho}
\frac{1}{\rho} 
&=
\frac{\log_2 p - \log_2 k_0 + \frac{\log_3 p}
{\log k_0}}{k_0} + O\left(\frac{1}{k_0 \log k_0}\right)\nonumber\\
&=
\frac{\log_2 p - \log_4 x - \log\left(1-\beta\right) +
\frac{\log_4 x}{\log_3 x}}{k_0} + O\left(\frac{1}{k_0 \log k_0}
\right),
\end{align}
and, by Erd\H{o}s and Tenenbaum~\cite[Lemma\ 2]{MR1014865}, we obtain
$
F\left(\rho, p\right) = \exp\left(k_0 + O\left(\frac{\rho}{
\log \rho}\right)\right)
$.

Using the Stirling's formula to estimate $\left(\lambda-1\right)!$, it 
follows from equation (\ref{Npk2})
and the definition of $\lambda$ in terms of $k_0$ that
\[
\#\mathcal{N}_{p,k}^{\prime}(x) = \frac{x}{p \log x}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}A^\beta}{\left(
\frac{1}{\beta}-1\right)k_0}\right)^{\frac{k_0}{\beta}}
\mathcal{R},
\]
and, since $\frac{k_0}{\beta} = k + O(1)$, we obtain
\begin{equation}
\label{npkprime}
\#\mathcal{N}_{p,k}^{\prime}(x) = \frac{x}{p \log x}
\left(\frac{eB}{k}\right)^k \mathcal{R},
\end{equation}
where 
$
B=B(x,p) = \frac{\left(\log_2 
x\right)^{1-\beta}A^\beta}{
\beta\left(\frac{1}{\beta}-1\right)^{1-\beta}}
$.
Hence, combining equations (\ref{sumN4}) and (\ref{npkprime}), we have
\[
\sum\limits_{\substack{n\in \mathcal{N}_4 (x)\\ p^{\left(\beta\right)}(n)
\in I\\ \omega(n) \in J}} \frac{1}{p^{\left(\beta\right)}(n)}
= \frac{x}{\log x} \mathcal{R}
\sum\limits_{p\in I}\frac{1}{p^2} \sum\limits_{k\in J}
\left(\frac{eB}{k}\right)^k
+ O\left(\frac{x\log_2 x \log_3 x}{\log x}\right).
\]
We can conclude from Lemma~\ref{function1} that
\begin{equation}
\label{sumNpkprime}
\sum\limits_{\substack{n\in \mathcal{N}_4 (x)\\ p^{\left(\beta\right)}(n)
\in I\\ \omega(n) \in J}} \frac{1}{p^{\left(\beta\right)}(n)}
=
\frac{x}{\log x}\mathcal{R} \sum\limits_{p\in I}\frac{1}
{p^2}\exp\left(B\right) + O\left(\frac{x\log_2 x \log_3 x}{\log x}\right).
\end{equation}
To estimate the sum over $p$, we note that
\[
\sum\limits_{p\in I}\frac{1}{p^2} \exp\left(B\right)
= \sum\limits_{p\in I}\frac{1}{p}\exp\left(B - \log p\right)
= \sum\limits_{p\in I}\frac{1}{p} g\left(\log p\right),
\]
where $g$ is the same function as the one defined 
in Lemma~\ref{function2},
$C = \log_4 x + \log\left(1-\beta\right) - \frac{\log_4 x}{
\log_3 x}$ and $D = \left(\frac{\beta \log_2 x}
{1-\beta}\right)^{1-\beta}$.
Moreover, from this same lemma, we have
\begin{equation}
\label{sumpbornesup}
\sum\limits_{p\in I}\frac{1}{p}g\left(\log p\right)
\leq g\left(t_0\right) \sum\limits_{p\in I}\frac{1}{p}
\ll g\left(t_0\right) \log_4 x,
\end{equation}
where, in particular,
\begin{equation}
\label{estimt0}
t_0 = \left(\frac{\beta}{\left(1-\beta\right)^2}\frac{\log_2 x}{\log_3 x}
\right)^{1-\beta}\left(1 + \left(2-\beta\right)\frac{\log_4 x}{\log_3 x}
+ O\left(\frac{1}{\log_3 x}\right)\right).
\end{equation}
Lemma~\ref{function2} also provides a lower bound for the sum over $p$.
Indeed, let $p_0$ be the largest prime number in $I$ such that
$\log p_0 \leq t_0$. In particular, by Bertrand's postulate, one can 
conclude that the prime number $p_0$ satisfies
$p_0 \in \left(\frac{1}{2} e^{t_0}, e^{t_0}\right]$. Thus, for
every prime number
$p\in \left(\frac{1}{\log_2 x}p_0, p_0 \log_2 x\right] \subset I$,
there exist positive constants $c_1$, $c_2$, and $c_3$ such that
\[
g\left(\log p\right) \geq g\left(\log p_0 - c_1 \left(\log_3 
x\right)\right)
\geq g\left(t_0 - c_2\left(\log_3 x\right)\right) \geq g\left(t_0\right)
\exp\left(-c_3\left(\left(\log_3 x\right)^{2-\beta}\right)\right)
\]
for every $x>e^{e^e}$, so that
\begin{align}
\label{sumpI}
\sum\limits_{p\in I}\frac{1}{p}g\left(\log p\right)
&\geq
g\left(t_0\right)\exp\left(-c_3\left(\log_3 x\right)^{2-\beta}\right)
\sum\limits_{p\in \left[ \frac{p_0}{\log_2 x}, p_0 \log_2 x\right]}
\frac{1}{p}\nonumber\\
&\gg 
g\left(t_0\right)\exp\left(-c_3\left(\log_3 x\right)^{2-\beta}
\right)
\left(\frac{\log_3 x}{\log_2 x}\right)^{1-\beta}\nonumber\\
 &\geq
 g\left(t_0\right)
\exp\left(\left(\log_3 x\right)^{2-\beta}\right).
\end{align}
Hence, from equation (\ref{sumNpkprime}),
the upper bound (\ref{sumpbornesup}), and the lower bound (\ref{sumpI}), 
we have
\begin{equation}
\label{premresult}
\sum\limits_{\substack{n\in \mathcal{N}_4 (x)\\ p^{\left(\beta\right)}(n)
\in I\\ \omega(n) \in J}} \frac{1}{p^{\left(\beta\right)}(n)}
= \frac{x}{\log x}g\left(t_0\right)\mathcal{R}.
\end{equation}
Estimates (\ref{preleq1}), (\ref{preleq3}), and (\ref{premresult})
allow us to write
\begin{equation}
\label{implicitresult}
\sum\limits_{n\leq x}\frac{1}{p^{\left(\beta\right)}(n)}
= \frac{x}{\log x}g\left(t_0\right)\mathcal{R}
+ E (x),
\end{equation}
where  the error term $E(x)$ is defined by
\[
E(x) = \sum\limits_{\substack{n\in\mathcal{N}_4 (x)\\ 
p^{\left(\beta\right)}(n) \not\in I \mbox{ \tiny{or} } \omega(n)\not\in 
J}}\frac{1}
{p^{\left(\beta\right)} (n)}.
\]
In particular, an explicit evaluation
of $g\left(t_0\right)$ using equation (\ref{estimt0}) yields the main term 
on the right-hand side of (\ref{result}). What is left to do is to obtain 
an upper bound for the error term.

\section{Estimation of the error term}
In this section, we show that the error term $E(x)$ satisfies
$
E (x) = o\left(\frac{x}{\log x}g\left(t_0\right)\right)$ as $x
\rightarrow\infty$.
We can proceed as in the proof of the upper bound given by De Koninck 
and Luca~\cite{MR3065334}. First, we have
from upper bound (\ref{preleq1}) and equation (\ref{preleq3}) that
\begin{equation}
\begin{array}{r@{}l}
\label{E0eq1}
\displaystyle\sum\limits_{n\leq x}\frac{1}{p^{\left(\beta\right)}(n)}
&{=} 
\displaystyle\sum\limits_{n\in\mathcal{N}_4(x)} \frac{1}
{p^{\left(\beta\right)}(n)}
+ O\left(\frac{x\left(\log_2 x\right)^{M-1}}{\log x}\right)\\
&{=}
\displaystyle\sum\limits_{p\in\left[3, \log x\right]}\frac{1}{p}
\sum\limits_{k\in \left[M+1, 10\log_2 x\right]}
\#\left(\mathcal{N}_{p,k}(x)\cap \mathcal{N}_4 (x)\right)
+ O\left(\frac{x\left(\log_2 x\right)^{M-1}}{\log x}\right).
\end{array}
\end{equation}
Moreover, by equation (\ref{Npk0}), we have
\[
\#\left(\mathcal{N}_{p,k}(x)\cap \mathcal{N}_4 (x)\right)
\leq
\sum\limits_{\substack{a\leq x\\ a\in\mathcal{A}}}\sum\limits_{\alpha = 
1}^{
\left\lfloor 10 \log_2 x\right\rfloor} \sum\limits_{\substack{b\leq
\frac{x}{ap^{\alpha}}\\ b \in \mathcal{B}}} 1.
\]
Hence, we get from Lemma~\ref{lemmahardyramanujan} that
\begin{equation}
\label{boundnpkn4}
\#\left(\mathcal{N}_{p,k}(x)\cap \mathcal{N}_4 (x)\right)
\ll
\frac{x}{\log x}\frac{\left(\log_2 x\right)^{\lambda -1}}{\left(\lambda 
-1\right)!}\sum\limits_{\substack{a\leq x\\ a\in\mathcal{A}}}
\frac{1}{a} \sum\limits_{\alpha = 1}^{\left\lfloor 10 \log_2 
x\right\rfloor}
\frac{1}{p^{\alpha}}
\ll
\frac{x}{p \log x}\frac{\left(\log_2 x\right)^{\lambda -1}}{\left(\lambda 
-1
\right)!} \sum\limits_{a\in\mathcal{A}}\frac{1}{a}.
\end{equation}
In light of the definition of the set $\mathcal{G}$, upper bound 
(\ref{boundnpkn4}) yields
\begin{equation}
\label{boundnpkn4eq2}
\#\left(\mathcal{N}_{p,k}(x)\cap \mathcal{N}_4 (x)\right)
\ll\frac{x}{p \log x}\frac{\left(\log_2 x\right)^{\lambda -1}}
{\left(\lambda 
-1
\right)!} \sum\limits_{a\in\mathcal{G}}\frac{1}{a}.
\end{equation}
On the other hand, observe that $\sum\limits_{a\in G}\frac{1}{a} = 0$
if $p<p_{k_0}$ and that for $p\geq p_{k_0}$, we have
\begin{align*}
\sum\limits_{a\in\mathcal{G}}\frac{1}{a} 
&\ll
\sum\limits_{\substack{p_1<p_2 <\cdots < p_{k_0 -1} < p\\
\alpha_i \geq 1}} \frac{1}{p_1^{\alpha_1}\cdots p_{k_0 
-1}^{\alpha_{k_0-1}}} =
\sum\limits_{\substack{p_1<p\\ \alpha_1\geq 1}}\frac{1}
{p_1^{\alpha_1}} \sum\limits_{\substack{p_1 < p_2<p\\
\alpha_2 \geq 1}}\frac{1}{p_2^{\alpha_2}}\ \cdots 
\sum\limits_{\substack{p_{k_0-2}<p_{k_0-1}<p\\ \alpha_{k_0-1}\geq 
1}}
\frac{1}{p_{k_0 -1}^{\alpha_{k_0-1}}}\\
&\ll 
\sum\limits_{p_1 < p}\frac{1}{p_1 -1} \sum\limits_{p_1 < p_2 < 
p}\frac{1}{p_2 -1}\ \cdots \sum\limits_{
p_{k_0 -2} < p_{k_0 -1} \leq p}\frac{1}{p_{k_0 -1} -1}\\
&\leq
\frac{1}{\left(k_0 -1\right)!}\left(\sum\limits_{q \leq p}\frac{1}
{q-1}\right)^{k_0 -1}
\ll \frac{1}{\left(k_0 -1\right)!}\left(\log_2 p + c\right)^{
k_0 -1}
\end{align*}
for some positive constant $c$, where the  
inequality comes from Mertens' 
estimate. Hence, it follows from upper bound (\ref{boundnpkn4eq2}) that
\begin{equation}
\label{bornenpkn4}
\#\left(\mathcal{N}_{p,k}(x) \cap \mathcal{N}_4 (x)\right)
\ll \frac{x}{p \log x}\frac{\left(\log_2 x\right)^{\lambda -1}}{
\left(\lambda -1\right)!}\frac{\left(\left(1+o(1)\right)\log_2 p \right)^{
k_0 -1}}{\left(k_0 - 1\right)!}.
\end{equation}
Using bound (\ref{bornenpkn4}) in equation (\ref{E0eq1}) 
yields
\begin{equation}
\label{E0eq2}
\sum\limits_{n \in \mathcal{N}_4 (x)}\frac{1}{p^{\left(\beta\right)}(n)}
\ll \frac{x}{\log x}\sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2} \sum\limits_{k\in\left[M+1, 10\log_2 x\right]}
\frac{\left(\log_2 x\right)^{\lambda-1}}{\left(\lambda -1\right)!}
\frac{\left(\log_2 p + c\right)^{k_0 -1}}{\left(k_0 -1
\right)!} + \frac{x\left(\log_2 x\right)^{M-1}}{\log x}.
\end{equation}
Observe that we can assume that
$k\geq \log_3 x$.
Indeed, it follows from upper bound (\ref{E0eq2}) 
that
\begin{equation}
\label{E0eq22}
\sum\limits_{\substack{n \in \mathcal{N}_4 (x)\\ \omega(n) < \log_3 x}} 
\frac{1}{p^{\beta}
(n)}
\ll
\frac{x}{\log x}\left(\log_2 x\right)^{\log_3 x}\left(\left(1+o(1)
\right)\log_2 x
\right)^{\log_3 x}.
\end{equation}
Hence, combining estimates (\ref{E0eq2}) and (\ref{E0eq22}), we obtain
\begin{equation*}
\begin{array}{r@{}l}
\displaystyle\sum\limits_{n \in \mathcal{N}_4 (x)}\frac{1}
{p^{\left(\beta\right)}(n)}
&\ll \displaystyle
\frac{x}{\log x}\sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2} \sum\limits_{k\in\left[\log_3 x, 10\log_2 x\right]}
\frac{\left(\log_2 x\right)^{\lambda-1}}{\left(\lambda -1\right)!}
\frac{\left(\log_2 p + c\right)^{k_0 -1}}{\left(k_0 -1
\right)!}
\\
&\displaystyle  \qquad \qquad +
 \frac{x}{\log x} \exp\left(2\left(\log_3 x\right)^2 + o\left(\log_3 x
 \right)\right).
\end{array}
\end{equation*}
By applying Stirling's formula to $\left(\lambda -1\right)!$,
we then have
\begin{equation*}
\begin{array}{r@{}l}
\displaystyle
\sum\limits_{n\in \mathcal{N}_4 (x)}\frac{1}{p^{\left(\beta\right)}(n)}
&{\ll}\displaystyle
\frac{x}{\log x}\sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2} \sum\limits_{k\in\left[\log_3 x, 10\log_2 x\right]}
\frac{1}{k}
\left(\frac{e ­\log_2 x}{\lambda}\right)^{\lambda-1}
\left(\frac{e \left(\log_2 p + c\right)}{k_0}\right)^{k_0 -1}
\\
&{}\displaystyle \qquad \qquad
+ \frac{x}{\log x}\exp\left(2\left(\log_3 x\right)^2 + o\left(\log_3 x
\right)\right)\\
&{\ll}\displaystyle
\frac{x}{\log x}\sum\limits_{p\in \left[3, \log x\right]} \frac{1}{p^2}
\sum\limits_{k\in\left[\log_3 x, 10\log_2 x\right]}
\left(\frac{e\log_2 x}{\lambda}\right)^{\lambda}\left(\frac{e\left(\log_2 p
+ c\right)}{k_0}\right)^{k_0}\\
&{}\displaystyle \qquad \qquad
+ \frac{x}{\log x} \exp\left(2\left(\log_3 x\right)^2 + o\left(\log_3 
x\right)\right).
\end{array}
\end{equation*}
Expressing $\lambda$ and $k_0$ in terms of $k$, we get from
this upper bound that
\begin{equation}
\begin{array}{r@{}l}
\label{E0eq3}
\displaystyle\sum\limits_{n\in \mathcal{N}_4 (x)}\frac{1}
{p^{\left(\beta\right)}(n)}
&{\ll}\displaystyle
\frac{x \log_2 x}{\log x}\sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2} \sum\limits_{k\in\left[\log_3 x, 10\log_2 x\right]}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}
}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}k}\right)^k
\\
&{}\displaystyle \qquad \qquad
+ \frac{x}{\log x} \exp\left(2\left(\log_3 x\right)^2 + o\left(\log_3 x
\right)\right).
\end{array}
\end{equation}
Let $K_1$ and $K_2$ be the smallest and largest integers in the interval 
$J$ respectively.
Then, from Lemma~\ref{function1}, since
\[
K_1 = \frac{\left(1-\beta\right)^{\beta}}{4}
\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x \right)^{\beta}}{
\beta^{\beta}\left(1-\beta\right)^{1-2\beta}} + O(1)
\]
is smaller than the maximum of the function
$\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_3 x + c\right)^{
\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} t}\right)^{t}$,
we obtain that
\begin{align*}
\sum\limits_{k\in\left[\log_3 x, K_1\right]}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}
}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}k}\right)^k
&{\ll}
K_1 \left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_3 x + 
c\right)^{
\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} K_1}\right)^{K_1}\\
&{\ll}
\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}
\left(\frac{4e}{\left(1-\beta\right)^{2\beta}}\right)^{K_1}
\exp\left(o\left(K_1\right)\right).
\end{align*}
Since $\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}
\ll \exp\left(o\left(K_1\right)\right)$, it follows that
\begin{align}
\label{E0eq32}
\sum\limits_{k\in\left[\log_3 x, K_1\right]}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}
}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}k}\right)^k
&{\ll}
\exp\left(K_1 \left(1 + \log 4 - 2\beta \log\left(1-\beta\right) + 
o(1)\right)\right)\nonumber­\\
&{\ll}
\exp\left(\left(\frac{3}{5}+o(1)\right)
\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}}{
\beta^{\beta}\left(1-\beta\right)^{1-2\beta}}\right),
\end{align}
where the last inequality comes from the fact that
\begin{align*}
K_1 \left(1 + \log 4 - 2\beta \log\left(1-\beta\right)\right)
&{=}
\frac{1+ \log 4 - 2\beta \log\left(1-\beta\right)}{4 \left(1- 
\beta\right)^{-\beta}} \frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_3 x\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-
2\beta}} + O(1),
\end{align*}
where the first fraction is strictly smaller than $3/5$.
Indeed, the function $F\left(\beta\right)$ defined
for $\beta \in\left[0,1\right)$ by
\[
F\left(\beta\right) = \frac{1+ \log 4 - 2\beta \log
\left(1-\beta\right)}{4 \left(1- 
\beta\right)^{-\beta}}
\]
is strictly decreasing and $F\left(0\right) =
\frac{1 + \log 4}{4} < \frac{3}{5}$.
Hence, from upper bounds (\ref{E0eq3}) and (\ref{E0eq32}), we have that
\begin{equation}
\begin{array}{r@{}l}
\label{E0eq4}
\displaystyle\sum\limits_{n\in\mathcal{N}_4 (x)}
\frac{1}{p^{\left(\beta\right)}(n)}
&{\ll}\displaystyle
\frac{x \log_2 x}{\log x} \sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2}\sum\limits_{k\in \left[K_1, 10\log_2 x\right]}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} k}\right)^k
\\
&{}\displaystyle \qquad \qquad +
\frac{x}{\log x}\exp\left(\left(\frac{3}{5}+o(1)\right)
\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}}{
\beta^{\beta}\left(1-\beta\right)^{1-2\beta}}\right).
\end{array}
\end{equation}
Similarly, from Lemma~\ref{function1}, since
\[
K_2 = \frac{2 e \left(\log_2 x\right)^{1-\beta}\left(\log_3 
x\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}} + O(1)
\]
is larger than the maximum of the function $\left(\frac{e\left(\log_2 
x\right)^{1-\beta}\left(\log_3 x + c\right)^{
\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} t}\right)^{t}$, we
obtain
\begin{align}
\label{E0eq5}
\sum\limits_{k\in\left[K_2, 10\log_2 x\right]}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}
}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}k}\right)^k
&{\ll}
\sum\limits_{k\in\left[K_2, 10\log_2 x\right]}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_3 x + 
c\right)^{\beta}
}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}k}\right)^k\nonumber\\
&{\ll}
\log_2 x
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}
\left(1+o(1)\right)
}{\beta^{\beta}\left(1-\beta\right)^{1-\beta}K_2}\right)^{K_2}\nonumber\\
&{\ll}
\log_2 x \left(\frac{1}{2} + o(1)\right)^{K_2}
\ll
\log_2 x.
\end{align}
It follows from estimates (\ref{E0eq4}) and (\ref{E0eq5}) that
\begin{equation}
\begin{array}{r@{}l}
\label{E0eq51}
\displaystyle\sum\limits_{n\in\mathcal{N}_4 (x)}
\frac{1}{p^{\left(\beta\right)}(n)}
&{\ll}\displaystyle
\frac{x \log_2 x}{\log x} \sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2}\sum\limits_{k\in J}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} k}\right)^k
\\
&{}\displaystyle \qquad \qquad +
\frac{x}{\log x}\exp\left(\left(\frac{3}{5}+o(1)\right)
\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}}{
\beta^{\beta}\left(1-\beta\right)^{1-2\beta}}\right).
\end{array}
\end{equation}
Hence, from Lemma~\ref{function1}, we can conclude that
\begin{align*}
\sum\limits_{n\in\mathcal{N}_4 (x)}
\frac{1}{p^{\left(\beta\right)}(n)}
&\ll
\frac{x \log_2 x}{\log x} \sum\limits_{p\in\left[3, \log x\right]}
\frac{1}{p^2}\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_2 p + c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{
1-\beta}}\right)
\nonumber\\
& \qquad \qquad +
\frac{x}{\log x}\exp\left(\left(\frac{3}{5}+o(1)\right)
\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x\right)^{\beta}}{
\beta^{\beta}\left(1-\beta\right)^{1-2\beta}}\right).
\end{align*}
Let $q_1$ and $q_2$ be the smallest and largest prime numbers in the 
interval $I$ respectively. Then, for $p\leq q_1$, we have
\[
\log_2 p
\leq \log_2 q_1
=
\left(1-\beta\right)\left(\log_3 x - \frac{4}{1-\beta}\log_4 x - \log_5 x 
\left(1+o(1)\right)\right) =: \left(1-\beta\right) \mathcal{C}(x),
\]
so that
\begin{equation}
\label{sumpborne}
\frac{x \log_2 x}{\log x} \sum\limits_{p\in\left[3, q_1\right]}
\frac{1}{p^2}\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_2 p + c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{
1-\beta}}\right)
\ll
\frac{x}{\log x}
\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}\left(\mathcal{C}(x)
\right)^{\beta}}
{\beta^{\beta}
\left(1-\beta\right)^{1-2\beta}}\right).
\end{equation}
Combining upper bounds (\ref{E0eq51}) and (\ref{sumpborne}), we obtain
\begin{equation}
\begin{array}{r@{}l}
\label{E0eq6}
\displaystyle\sum\limits_{n\in\mathcal{N}_4 (x)}
\frac{1}{p^{\left(\beta\right)}(n)}
&{\ll}\displaystyle
\frac{x \log_2 x}{\log x} \sum\limits_{p\in\left[q_1, \log x\right]}
\frac{1}{p^2}\sum\limits_{k\in J}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} k}\right)^k
\\
&{}\displaystyle \qquad +
\frac{x}{\log x}
\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x -
\frac{4}{1-\beta}\log_4 x  +O\left(\log_5 x\right)\right)^{\beta}}
{\beta^{\beta}
\left(1-\beta\right)^{1-2\beta}}\right),
\end{array}
\end{equation}
since the second term in the right-hand side of estimate (\ref{E0eq51}) 
is smaller than the one of the bound (\ref{E0eq6}).
When the prime number $p$ satisfies $q_2 \leq p \leq \log x$, we 
have that
$\log_2 p \leq \log_3 x$
and that
$
\sum\limits_{p\geq q_2}\frac{1}{p^2} \ll \frac{1}{q_2 \log q_2}
$,
where $q_2 = \exp\left(\left(\log_2 x\right)^{1-\beta}\log_3 x\right)
+ O(1)$. Hence, as $x\rightarrow\infty$,
\begin{equation}
\label{sumpgrand}
\sum\limits_{p\in\left[q_2, \log x\right]}
\frac{\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_2 p + c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{
1-\beta}}\right)}{p^2}
\ll
\frac{\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}
\left(\log_3 x\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-
\beta}}\left(1+o(1)\right)\right)}{\exp\left(\left(\log_2 x\right)^{1-
\beta}\log_3 x\right)}
= o(1).
\end{equation}
It follows from estimates (\ref{E0eq6}) and (\ref{sumpgrand}) that
\begin{equation}
\begin{array}{r@{}l}
\label{E0eq7}
\displaystyle
\sum\limits_{n\in\mathcal{N}_4 (x)}
\frac{1}{p^{\left(\beta\right)}(n)}
&{\ll}\displaystyle
\frac{x \log_2 x}{\log x} \sum\limits_{p\in I}
\frac{1}{p^2}\sum\limits_{k\in J}
\left(\frac{e\left(\log_2 x\right)^{1-\beta}\left(\log_2 p + 
c\right)^{\beta}}{\beta^{\beta}\left(1-\beta\right)^{1-\beta} k}\right)^k
\\
&{}\displaystyle \qquad +
\frac{x}{\log x}
\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x -
\frac{4}{1-\beta}\log_4 x +O\left(\log_5 x\right)\right)^{\beta}}
{\beta^{\beta}
\left(1-\beta\right)^{1-2\beta}}\right).
\end{array}
\end{equation}
Finally, in light of equation (\ref{implicitresult}), since
\[
g\left(t_0\right)
=
\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}\left(
\log_3 x -  \frac{2-\beta}{1-\beta}\log_4 x + O(1)\right)^{\beta}}
{\beta^{\beta}
\left(1-\beta\right)^{1-2\beta}} + O\left(\left(\frac{\log_2 x}{\log_3 x}
\right)^{1-\beta}\right)\right),
\]
it follows from upper bound (\ref{E0eq7}) that
\[
\frac{x}{\log x}
\exp\left(\frac{\left(\log_2 x\right)^{1-\beta}\left(\log_3 x -
\frac{4}{1-\beta}\log_4 x - \log_5 x\left(1+o(1)\right)\right)^{\beta}}
{\beta^{\beta}
\left(1-\beta\right)^{1-2\beta}}\right)
= o\left(\frac{x}{\log x}g\left(t_0\right)\right).
\]
Hence, we can conclude that $E(x) = o\left(\frac{x}
{\log x}g\left(t_0\right)\right)$, which completes the proof of 
Theorem~\ref{primaryresult}.

\section{Final remarks}
The error term $\mathcal{R}$ in Theorem~\ref{primaryresult} seems 
difficult
to improve if one wants to obtain an explicit result, the reason being 
that
our result comes directly
from the estimation of $\rho$ and $F\left(\rho,p\right)$ provided in 
Erd\H{o}s and 
Tenenbaum~\cite{MR1014865}. In fact, estimate (\ref{estrho}) is the same 
as the one given by Erd\H{o}s and Tenenbaum~\cite[Lemma 1]{MR1014865}, so 
that obtaining an 
explicit result better than the one given in Theorem~\ref{primaryresult} 
would require improving the
Erd\H{o}s and Tenenbaum estimates. However, it would still be interesting
to obtain an estimate for $\#\mathcal{N}_{p,k}(x)$ in a range wider than 
the one provided by the primes $p\in I$ and integers $k\in J$.

\section{Acknowledgments}
The author wishes to thank J. M. De Koninck, N. Doyon, and the reviewers for their
helpful remarks and support. This study has been funded in part by NSERC and FRQNT.


\begin{thebibliography}{99}

\bibitem{MR657120}
K. Alladi, The distribution of $\nu (n)$ in the sieve of Eratosthenes,
\textit{Quart. J. Math. Oxford Ser.} (2) {\bf 33} (1982), 
129--148.

\bibitem{MR1239141}
J. M. De Koninck, Sur les plus grands facteurs premiers d'un entier,
\textit{Monatsh. Math.} {\bf 116} (1993), 13--37.

\bibitem{MR2919246}
J. M. De Koninck and F. Luca, \textit{Analytic Number Theory: Exploring 
the Anatomy of Integers}, Graduate Studies in Mathematics, Vol.~134, 
American Mathematical Society, 2012.

\bibitem{MR3065334}
J. M. De Koninck and F. Luca, On the middle prime factor of an integer,
\textit{J. Integer Sequences} {\bf 16} (2013), 
\href{https://cs.uwaterloo.ca/journals/JIS/VOL16/DeKoninck/dek14.html}{Article
13.5.5}.

\bibitem{MR896810}
P. Erd\H{o}s, A. Ivi\'{c}, and C. Pomerance, On sums involving reciprocals 
of the largest prime factor of an integer, \textit{Glas. Mat. Ser. III} 
{\bf{21}} (1986), 283--300.

\bibitem{MR1014865}
P. Erd\H{o}s and G. Tenenbaum, Sur les densit\'{e}s de certaines suites 
d'entiers, \textit{Proc. Lond. Math. Soc.} (3) {\bf{59}} (1989), 
417--438.

\bibitem{MR681439}
P. Erd\H{o}s and A. Ivi\'{c}, Estimates for sums involving the largest 
prime factor of an integer and certain related additive functions, 
\textit{Studia Sci. Math. Hungar.} {\bf 15} (1980), 183--199.

\bibitem{MR710969}
P. Erd\H{o}s and A. Ivi\'{c}, On sums involving reciprocals of certain 
arithmetical functions, \textit{Publ. Inst. Math. (Beograd) (N.S.)} 
{\bf{32}} (1982), 49--56.

\bibitem{MR2337059}
F. Luca and C. Pomerance, Irreducible radical extensions and 
Euler-function chains, in \textit{Combinatorial Number Theory}, de 
Gruyter, 2007, pp.~351--361.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 {\em Mathematics Subject Classification}:  Primary
11N37.

\noindent{\em Keywords}: number of distinct prime factors, smooth number, 
middle prime factor.

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received  September 14 2017; 
revised version received  October 1 2017.
Published in {\it Journal of Integer Sequences}, October 29 2017.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                


.
