<<

arXiv:2006.16491v2 [math.NT] 8 Jul 2020 li( oaihi nerlfnto li( integral logarithmic nters fti ae.Tepienme hoe ttsthat states theorem prime The paper. this of rest the in anfcso h case the on focus main h eaiu of behaviour The fitgr esta requal or than less integers of as o oiieinteger positive a For hsipisteeitneo constants of existence the implies This o ag enough large for onso h ro em including term, error the on bounds ntncsaiydsic)pie r aldsmpie.I hscase, this In . called are primes [ Sharifullina distinct) necessarily (not suigteReanhptei,Rse n coned[ Schoenfeld and Rosser hypothesis, Riemann the Assuming rvdb xe [ Axler by proved nldn h eetwr fTuga [ Trudgian of work recent the including 2000 x nti ae,w ou ntecase the on focus we paper, this In roso h ata uso h smttcsre r inves are series asymptotic the comput of are of sums constants products calculatio partial to the approach the the and for of presented algorithm errors is An series given. asymptotic explicitly terms the eirm santrlnme hc a ewitna h pro the as written be can which function number the natural of behaviour a asymptotic is A ssuid sn obntra ruet smttcser asymptotic argument, combinatorial a Using studied. is ) ∼ ahmtc ujc Classification Subject log x x P 14

π n ∞ eetyue rbblsi ruet oapoiaetebehavio the approximate to arguments probabilistic used recently ] =0 ( x x 1 ) te xlctetmtsof estimates explicit Other . (log ]. ntecutn ucino semiprimes of function counting the On π − k

π n π ( li( x ! 2 x ( k ) ( x n a enetnieysuiddrn attocnuis ihthe with centuries, two last during studied extensively been has ) x x ) n oiieitgr(rra number) real (or integer positive a and ) onso h ro emhv enetbihdi h literature, the in established been have term error the on Bounds . ) k k

− ≈ ,where 1, = rms for primes, ≤ Dragos li( x d x log(log x 1 x ) log

= ) (log hc a ewitna h rdc of product the as written be can which | ≤ , π x ( Cris 13 piay,1K5 16 scnay.. (secondary). 11Y60 11K65, (primary), 11N37 R x 0 x x π k 0 x x . ) 1. ) k 2 2795 22 d ) π log ≥ 3 − ( , 1 / x ,weetenmeswitna rdcso two of products as written the where 2, = 1 nadRdkErban Radek and an Abstract 0 + 4 ,wopoe ht o ucetylarge sufficiently for that, proved who ], ,i loproposed. also is 3, ( ,tenme fsmpie esta reulto equal or than less semiprimes of number the ), and li( Introduction − x exp 1 stepiecutn ucin denoted function, counting prime the is ) (log x . t ) 265 | d π d  < 2 ( t x x − x uhthat such ) log a ewitna naypoi expansion asymptotic an as written be can ,i em of terms in ), √ d 3 x / 2 x 4 p x 8 log π exp log − x 1 e of ies ftecntnsivle nthe in involved constants the of n x

. 540  iae.Agnrlzto fthis of generalization A tigated. − 19 dt 0sgicn iis The digits. significant 20 to ed , r , π (log x 6 20 log 2 x . ( n log and 455 x x let , o all for uto w rms The primes. two of duct salse vnsharper even established ] sdtrie,wt all with determined, is ) x x ) π ! 2 ( x . π . smkaeo and Ishmukhametov ) k x x ( ∼ x ≥ r civbe as achievable, are etenumber the be ) k li( 2 . rm factors. prime x ,weethe where ), x rof ur , π (1.2) (1.1) x π 2 , ( ( x x ) ) Page 2 of 13 DRAGOS, CRIS, AN AND RADEK ERBAN

The first term of (1.2) has already been known to Landau [15, 56], with his result stated, for general k N, as § ∈ 1 x (log(log x))k 1 π (x) − . (1.3) k ∼ (k 1)! log x − Delange [6, Theorem 1] obtained the asymptotic expansion of πk(x) in the form

x ∞ P (log(log x)) π (x) n,k , (1.4) k ∼ log x (log x)n n=0 X where Pn,k are polynomials of degree k 1, with the leading coefficient equal to n!/(k 1)! . Tenenbaum [21] proved a similar result,− giving an expression for the coefficients in− the z polynomial P in terms of the derivatives of 1 1+ z 1 1 evaluated at z = 0. 0,k Γ(z+1) p p 1 − p Considering k = 2 in (1.4), we can write an asymptotic expansion− for π (x) as Q  2 ∞ x log(log x) ∞ x π2(x) (n 1)! + Cn 1 . (1.5) ∼ − (log x)n − (log x)n n=1 n=1 X X In Theorem 2.3, we prove that C0 = M, where M =0.261497... is the Meissel–Mertens constant defined by 1 M = lim log(log x) , (1.6) x p − →∞ p x ! X≤ where we sum over all primes such that p x. In Section 3, we calculate the rest of constants ≤ Cn appearing in equation (1.5). They are given in Table 1 and obtained by the formula n B n 1 n B C = n! i = n! i H , (1.7) n i! − i i! − i i=0 i=1 ! i=0 ! X X X where Hi is the i-th , B0 = M and constants Bi are defined using the asymptotic behaviour of sums [15, 56] § i i (log p) (log x) 14√log x = + B + e− , for i N. (1.8) p i i O ∈ p x X≤   Constants Bi are given as limits (3.1) in Section 3, where we present an algorithm to efficiently calculate them to a desired accuracy. They are computed in Table 1 to 20 significant digits. Rosser and Schoenfeld [18] prove that the error term in (1.8) can be given explicitly in terms of an integral, which contains the error terms in the theorem. For the case i =1 in equation (1.8), explicit estimates of this sum and, in particular, of the constant B1 involved, were recently obtained by Dusart [8]. A related , Ω(m), is defined to be the number of prime of m N, where prime divisors are counted with their multiplicity. Considering fixed x in equation (1.3),∈ we can view this approximation of πk(x)/x as the probability mass function of the Poisson distribution with mean log(log(x)). Erd˝os and Kac [9] showed that the distribution of Ω(x) is Gaussian with mean log(log(x)) (see also R´enyi and Tur´an [17] and Harper [13] for generalizations and better bounds). Diaconis [7] obtained the asymptotic expansions for the average number of prime divisors as (see also Finch [11, Section 1.4.3]) n 1 1 ∞ − γ (n 1)! Ω(m) log(log x)+1.0346538818 + 1+ i − , (1.9) x ∼ ··· − i! logn x m x n=1 i=0 ! X≤ X X where the constants γi are the Stieltjes constants, numerically computed in [3] to 20 significant digits. An asymptotic series for the variance of Ω have also been obtained [11, Section 1.4.3]. ON THE COUNTING FUNCTION OF SEMIPRIMES Page 3 of 13

The Stieltjes constants γi are used in Section 3 during our calculation of the values of constants Bn and Cn, for n N. This paper is organized∈ as follows. Section 2 begins with a counting lemma for expressing the semiprime counting function π2 in terms of the prime counting function π. Using this lemma, the main results on the asymptotic behaviour of π2 are stated and proved in Section 2 as Theorem 2.3 and Theorem 2.5. While Theorem 2.3 only gives the first two terms, its proof is more coincise than the proof of Theorem 2.5, which gives the full asymptotic series of π2. The constants Cn which appear in this asymptotic series are computed in Section 3, where we present an efficient approach to calculate both constants Bn and Cn, based on the differentiation of the prime zeta function. In Section 4, we investigate the behaviour of the error terms given by the partial sums of the asymptotic series of π2. We conclude with a generalization of the counting argument in Section 5, discussing the extensions of the presented results to the general case of counting functions π for k 3. k ≥

2. Asymptotic behaviour of the counting function of semiprimes As in equation (1.6), we denote primes by p and the sums over p shall be understood as sums over all primes satisfying the given condition. In the case of summing over primes twice, we denote the corresponding prime summation indices by p1 and p2. We begin with a simple counting formula [14], that gives a way of computing π2(x).

Lemma 2.1. For a positive integer x, the following holds π(√x) π(√x)2 x π (x)= − + π . (2.1) 2 2 p p √x   X≤

Proof. By the definition of counting functions π2 and π, we have x π2(x)= 1 = 1 = π π(p1)+1 x p1 − 1 2 1 2 p p p1 √x p p p1 p1 √x     p1Xp≤2 x X≤ ≤X≤ X≤ ≤ and formula (2.1) follows by renaming p1 to p in the first term and observing that the rest of the right hand side is the sum of all natural numbers from 1 up to π(√x) 1. −

Formula (2.1) gives an expression of π2(x) in terms of the prime counting function π(x), which can be approximated using the prime number theorem [21] as x π(x)= α (x)+ , (2.2) n O (log x)n+1   where n N and ∈ n 1 x − i! α (x)= . (2.3) n log x (log x)i i=0 ! X Using Landau [15, 56], we can rewrite equation (1.6) for any integer n N as § ∈ 1 1 = log(log x) log 2 + M + o , (2.4) p − (log x)n p √x   X≤ where we use the little o asymptotic notation [5], as opposed to the big asymptotic notation used in the prime number theorem (2.2). First we use this result to apOproximate the sum on the right hand side of equation (2.1). Page 4 of 13 DRAGOS, CRIS, AN AND RADEK ERBAN

Lemma 2.2. Let n N and α (x) be defined by (2.3). Then we have ∈ n x x x log(log x) π = α + . (2.5) p n p O (log x)n+1 p √x   p √x     X≤ X≤

Proof. Using equation (2.2), we have

x x x x 1 π α π α c x , p − n p ≤ p − n p ≤ p (log x log p)n+1 p √x   p √x   p √x     p √x − X≤ X≤ X≤ X≤ where c> 0 is a constant. Equation (2.5) then follows by estimating the right hand side by

c x 2n+1 1 x log(log x) = , (log x)n+1 p O (log x)n+1 p √x   X≤ where the last equality follows from equation (2.4).

2.1. The first two terms of the asymptotic series for π2(x) Using (2.5) for n = 1, we obtain x x x log(log x) π = + . (2.6) p p (log x log p) O (log x)2 p √x   p √x   X≤ X≤ − Using Landau [15, 56], we can rewrite equation (1.8) for any integers i N and n N as § ∈ ∈ (log p)i (log x)i 1 = + B + o . (2.7) p i 2i i (log x)n p √x   X≤ We will use this to prove the first theorem of this section.

Theorem 2.3. Let M be the Meissel–Mertens constant defined by (1.6). Then x log(log x) x x π (x)= + M + o . (2.8) 2 log x log x log x  

Proof. Using equations (2.1), (2.2) for n = 1, and (2.6), we obtain x x x log x x π (x)= π + o = + o . (2.9) 2 p log x log x p (log x log p) log x p √x     p √x   X≤ X≤ − We have the following identity log x 1 log p log x = + . p (log x log p) p log x p (log x log p) −  −  Substituting the left hand side into the right hand side, we obtain, for any n N, that ∈ n log x 1 log p i log p n+1 log x = + . p (log x log p) p log x log x p (log x log p) i=0 − X      −  Summing over all primes p √x , we get ≤ n log x 1 (log p)i 1 (log p)n+1 = + . p (log x log p) (log x)i p  (log x)n p (log x log p) p √x i=0 p √x p √x X≤ − X X≤ X≤ −   ON THE COUNTING FUNCTION OF SEMIPRIMES Page 5 of 13

Each term on the right hand side can be evaluated using equations (2.4) and (2.7), with o(1) accuracy, as n log x 1 = log(log x) log 2 + M + + f(n)+ o(1), (2.10) p (log x log p) − i 2i p √x i=1 X≤ − X where f(n) is a decreasing function of n satisfying f(n) 0 as n . This can be deduced by applying equation (2.7) to the error term → → ∞ 1 (log p)n+1 2 (log p)n+1 1 = + o(1). (log x)n p (log x log p) ≤ (log x)n+1 p (n +1)2n p √x p √x X≤ − X≤ Since we have n 1 log 2 + + f(n) 0, as n , − i 2i → → ∞ i=1 X equation (2.10) implies that log x = log(log x)+ M + o(1). p (log x log p) p √x X≤ − Substituting into equation (2.9), we obtain formula (2.8).

2.2. Asymptotic series for the counting function of semiprimes

To derive formulas for all terms in the asymptotic series of π2, we first define an auxiliary sequence of numbers q for n N by n ∈ n 1 − 2i 1 q = − , for n 2, and q =0 . (2.11) n i ≥ 1 i=1 X Then qn is an increasing sequence of rational numbers with the first few terms given as q1 =0, q2 = 1, q3 =5/2, q4 = 29/6, q5 = 103/12 and q6 = 887/60, which satisfies the following identity.

Lemma 2.4. Let n N and let q be given by equation (2.11). Then we have ∈ n ∞ n + i 1 1 − = q + log 2 . (2.12) n 1 i 2i n i=1 X  − 

Proof. Considering the binomial series

n ∞ n + i i (1 t)− =1+ t t , for t ( 1, 1), − n 1 ∈ − i=0 X  −  we can rewrite it as n n ∞ n + i i (1 t)− 1 i t = − − = (1 t)− . n 1 t − i=0 i=1 X  −  X Integrating, we get

i+1 n i+1 ∞ n + i t (1 t)− 1 = log(1 t)+ − − , n 1 i +1 − − i 1 i=0 i=2 X  −  X − which holds for t ( 1, 1). Substituting t =1/2, we obtain (2.12). ∈ − Page 6 of 13 DRAGOS, CRIS, AN AND RADEK ERBAN

We will use Lemma 2.4 in the proof of the following theorem, giving the asymptotic series for the semiprime counting function π2(x).

Theorem 2.5. The constants Cn appearing in the asymptotic expansion (1.5) are given by equation (1.7) for n N and as C = B = M for n =0. ∈ 0 0

Proof. The case n = 0 is studied in Theorem 2.3, which states that C0 = M. To derive equation (1.7), we again use formula (2.1) from Lemma 2.1 and approximate each term using the prime number theorem (2.2). We need to analyze sums of the form n (log x)n 1 log p − S (x)= = 1 . (2.13) n p (log x log p)n p − log x p √x p √x   X≤ − X≤ Using the binomial series on the right hand side, we get i 1 ∞ n + i 1 log p ∞ n + i 1 1 (log p)i S (x) = − = − . (2.14) n p n 1 log x n 1 (log x)i p p √x i=0     i=0   p √x X≤ X − X − X≤ Substituting x2 for x, we obtain

∞ n + i 1 1 (log p)i S (x2)= − . (2.15) n n 1 2i(log x)i p i=0   p x X − X≤ To estimate the sums over primes on the right hand side, we apply the result of Rosser and Schoenfeld [18, equation (2.26)], which can be formulated as 1 (log p)i (log x)i = log(log x)+ (x), = + (x), p L0 p i Li p x p x X≤ X≤ where the error terms (x) are defined by Li li(2) π(x) li(x) x π(y) li(y) 0(x)= log(log 2) + + − + −2 dy, L − 2 x Z2 y (log 2)i (log 2)i li(2) (log x)i (x)= + + π(x) li(x) Li − i 2 x − x i 1 (log y i) (log y) −  N + − 2 π(y) li(y) dy, for i . Z2 y − ∈ Using this notation and identity (2.12) in Lemma 2.4, we rewrite equation (2.15) as

∞ n + i 1 1 (x) S (x2) = log(log x)+ q + log(2) + − Li . (2.16) n n n 1 2i (log x)i i=0 X  −  Using the inequality (1.1), there exist constants d1 and d2 such that x i 1 (x) 2 π(x) li(x) 1 i log y (log y) − Li < + | − | + | − | π(y) li(y) dy (log x)i (log x)i x (log x)i Z y2 − 2 2 exp d √log x i I(i 1, x)+ I(i, x) − 2 i + d1 3/4 + − i , (2.17) ≤ (log x) (log x)  (log x) where we define (note that we allow the second argument to be in this definition): ∞ x exp d2√log y I(i, x)= d (log y)i 3/4 − dy . 1 Z − 2 y  ON THE COUNTING FUNCTION OF SEMIPRIMES Page 7 of 13

Choose ℓ N. Our goal is to use (2.17) to estimate the rate of convergence of the sum on the right hand∈ of equation (2.16). To do this we first observe that, for i ℓ, we have ≥ x I(i, x) d1 ℓ 3/4 exp d2√log y I(ℓ, ) (log y) − − dy ∞ . (2.18) i ℓ Z ℓ (log x) ≤ (log x) 2 y  ≤ (log x) Using inequalities (2.17) and (2.18) and assuming log(x) 1, we can estimate the remainder of the series on the right hand of equation (2.16) as ≥

∞ n + i 1 1 (x) 2 exp d √log x ∞ n + i 1 1 i − 2 − i L i ℓ+1 + d1 3/4 − i n 1 2 (log x) ≤ (log x) (log x) ! n 1 2 i=ℓ+1  −   i=ℓ+1  −  X X I(ℓ, ) ∞ n + i 1 i I(ℓ +1, ) ∞ n + i 1 1 + ∞ − + ∞ − . (log x)ℓ+1 n 1 2i (log x)ℓ+1 n 1 2i i=Xℓ+1  −  i=Xℓ+1  −  Since all three sums on the right hand side converge independently of x, we deduce that the (ℓ+1) remainder is of the order (log x)− ) . Therefore, equation (2.16) becomes O ℓ  n + i 1 1 (x) 1 S (x2) = log(log x)+ q + log(2) + − Li + . n n n 1 2i (log x)i O (log x)ℓ+1 i=0 X  −    2 This means that an asymptotic expansion of Sn(x ) in terms of negative powers of log x is given by the sum of the asymptotic series of terms in equation (2.15). The same is true for Sn(x) in equation (2.14). Thus, using equations (2.4), (2.7), (2.12) and (2.14), we obtain

ℓ n + i 1 1 (log p)i 1 S (x)= − + n n 1 (log x)i p O (log x)ℓ+1 i=0   p √x   X − X≤ ℓ n + i 1 B 1 = log(log x)+ M + q + − i + . (2.19) n n 1 (log x)i O (log x)ℓ+1 i=1 X  −    Using equations (2.3) and (2.5), we have

ℓ ℓ x x x (n 1)! xS (x) π + o = − = (n 1)! n , p (log x)ℓ p (log x log p)n − (log x)n p √x     n=1 p √x n=1 X≤ X X≤ − X where we used the definition (2.13) of Sn(x) to get the second equality. Using equation (2.19) and notation B0 = M, we obtain ℓ ℓ n 1 x x log(log x) − B x x π = (n 1)! + (n 1)! q + i + o . p − (log x)n − n i! (log x)n (log x)ℓ p √x   n=1 n=1 i=0 !   X≤ X X X Thus, using formula (2.1) and the prime number theorem (2.2), we obtain the asymptotic expansion (1.5), where we have

n B n C = n! q + i 2n (i 1)! (n i)! . n n+1 i! − − − i=0 ! i=1 X X This can be further simplified by using definition (2.11) of qn. We get n n n 1 n n n 2i 1 B 2n − 1 2i 1 B 2i C = n! − + i = n! − + i . n i i! − n n 1 i i! − i i=1 i=0 i=0 −i ! i=1 i=0 i=1 ! X X X X X X Subtracting the first and the third sum, we obtain (1.7). Page 8 of 13 DRAGOS, CRIS, AN AND RADEK ERBAN

3. Computing the constants

In this section, we use a fast converging series to determine the values of the constants Bn and, as a result, of the constants Cn given by equation (1.7). The first constant, B0 = C0 = M, is the well-studied Meissel–Mertens constant, so we will focus on constants Bn in the case n 1. They have been defined by equations (1.8) or (2.7), which can be rewritten as ≥

(log p)n (log x)n (log p)n (log x)n Bn = lim = lim . (3.1) x  p − n 2n  x  p − n  →∞ p √x →∞ p x X≤ X≤     To derive a formula for evaluating Bn on a computer, we use the prime zeta function [12] defined by 1 P (s)= , for s (1, ). (3.2) ps ∈ ∞ p X Differentiating equation (3.2), we get the formula for the n-th derivative of the prime zeta function as (log p)n (log p)n (log p)n P (n)(s) = ( 1)n = ( 1)n + ( 1)n . (3.3) − ps − ps − ps p p x p>x X X≤ X The prime zeta function P (s) can also be related to the ζ(s) through the formula [12] ∞ log ζ(is) P (s)= µ(i) , for s (1, ), i ∈ ∞ i=1  X where µ(n) is the M¨obius function. Taking the derivative of order n of this expression, we obtain (n 1) (n) ∞ n 1 ζ′ − P (s)= µ(i) i − (is) . ζ i=1 X   Substituting into (3.3), we obtain

n (n 1) n (log p) n ∞ n 1 ζ′ − (log p) = ( 1) µ(i) i − (is) . (3.4) ps − ζ − ps p x i=1   p>x X≤ X X Using integration by parts, we obtain

n 1 n (n 1) ∞ (log u) − (n 1)! ( 1) − du = − = − . Z us (s 1)n − s 1 1 −  −  Thus, the second sum on the right hand side of equation (3.4) can be approximated by

n n 1 n (n 1) x n 1 (log p) ∞ (log u) − ( 1) − (log u) − = du + o(1) = − du + o(1) . ps Z us − s 1 − Z us p>x x 1 X  −  Substituting into equation (3.4), we get

x (n 1) (n 1) n n 1 ∞ n (log p) (log u) − n n 1 ζ′ − ( 1) − du = ( 1) µ(i) i − (is) + − + o(1) . ps − Z us − ζ s 1 p x 1 i=1     X≤ X − Taking the limit as s 1 and substituting into equation (3.1), we obtain → (n 1) (n 1) n ∞ n 1 ζ′ − n ζ′(s) 1 − Bn = ( 1) µ(i) i − (i) + ( 1) lim + , (3.5) − ζ − s 1 ζ(s) s 1 i=2 → X    −  ON THE COUNTING FUNCTION OF SEMIPRIMES Page 9 of 13

n Bn Cn

0 0.26149721284764278375 0.26149721284764278375 1 1.3325822757332208817 2.0710850628855780875 2 −2.5551076154464547041 −7.6972777412176108802 3 −10.253827096911327612 −35.345660320564161516 4 −59.332397971808450296 −206.71503925406509339 5 −453.62459086132753356 −1.5111997871316530251 103 6 −4.3591249600559955673 103 −1.3546323682845914021 × 104 7 −5.0684840978914262902 × 104 −1.4622910675883565523 × 105 8 −6.9270677393697978276 × 105 −1.8675796280076650637 × 106 9 −1.0884508606344556845 × 107 −2.7733045258413542557 × 107 10 −1.9329009099289751454 × 108 −4.7098342357703294361 × 108 − × − ×

Table 1. Table of constants Bn and Cn, for n =0, 1, 2,..., 10, defined by equations (2.7) and (1.7), which appear in the asymptotic expansion of π2(x). The values of constants Bn are computed by formula (3.5) using the Laurent series (3.6). The values of constants Cn are computed by equation (1.7). where the first term on the right hand side is a quickly converging series and the limit in the second term can be evaluated using the Laurent expansion of ζ(s) around s = 1. This is given by 1 ∞ ( 1)n ζ(s)= + − γ (s 1)n, s 1 n! n − n=0 − X where the Stieltjes constants γn are computed to 20 significant digits in [3]. Then, the Laurent expansion of the logarithmic derivative [4] of the Riemann zeta function is ζ (s) 1 3 ′ = + γ + ( 2γ γ2)(s 1) + γ +3γ γ + γ3 (s 1)2 ζ(s) −s 1 0 − 1 − 0 − 2 2 0 1 0 − −   2 + γ 2γ γ 2γ2 4γ2γ γ4 (s 1)3 + .... (3.6) −3 3 − 0 2 − 1 − 0 1 − 0 −   Constants Bn computed by formula (3.5) using the Laurent series (3.6) are presented in Table 1. Once we know constants Bn to the desired accuracy, we can use equation (1.7) to calculate constants Cn. They are also presented in Table 1 to 20 significant digits.

4. Computational results: behaviour of error terms In this section, we illustrate the accuracy of the asymptotic series (1.5) by calculating its error terms at each order. Since (1.5) is a sum of two formal asymptotic series, we have two ways to define its errors. First, we can truncate both sums after the same number, ℓ, of terms to define the relative error ℓ ℓ 1 x log(log x) x N ε2ℓ(x)= (n 1)! n + Cn 1 n π2(x) , for ℓ , (4.1) π2(x) − (log x) − (log x) ! − ∈ n=1 n=1 X X which is plotted in Figure 1(a) for x = 106, x = 108 and x = 1010. Combining both sums in the asymptotic expansion (1.5) into one, we can write it as x log(log x) x x log(log x) x 2 x log(log x) π (x) + C + + C + + ..., 2 ∼ log x 0 log x (log x)2 1 (log x)2 (log x)3 Page 10 of 13 DRAGOS, CRIS, AN AND RADEK ERBAN

(a) (b)

-1 10 -2 10

10 -2 10 -3 10 -3 10 -4 10 -4 -5 10 10 -5

1 2 3 4 5 6 7 8 9 10 1 4 7 10 15 20

Figure 1. (a) Relative errors calculated by (4.1) for x = 106, x = 108 and x = 1010. (b) Relative errors calculated by (4.5) for x = 108 and x = 1010. The relative error of Landau’s approximation (4.2) is plotted as ε1(x). The relative error of the approximation given in Theorem 2.3 is plotted as ε2(x).

so we can define the n-th approximation, an(x), by x log(log x) a (x)= , (4.2) 1 log x ℓ x log(log x) ℓ x a2ℓ(x)= (i 1)! + Ci 1 , for ℓ =1, 2, 3,..., (4.3) − (log x)i − (log x)i i=1 i=1 Xℓ+1 Xℓ x log(log x) x a2ℓ+1(x)= (i 1)! + Ci 1 , for ℓ =1, 2, 3,..., (4.4) − (log x)i − (log x)i i=1 i=1 X X where approximation a1(x) is used in equation (1.3) and α2(x) is the approximation given in equation (2.8). With definitions (4.2)–(4.4), we can define the relative error by

an(x) π2(x) εn(x)= | − | . (4.5) π2(x) This definition is consistent with (4.1) for even values of n. The results computed by (4.5) are plotted in Figure 1(b) for x = 108 and x = 1010. In Figure 1, we study the behaviour of the relative error (4.5) for a fixed value of x. We observe that the relative error εn(x) is initially a decreasing sequence (for smaller values of n). It reaches its minimum and then it starts increasing again. Denoting the value of n where the relative error reaches its minimum as nmin(x), we observe that nmin(x) is an increasing function of x, at least for the three values of x considered in Figure 1(a). Since x is fixed in Figure 1, the relative error (4.5) is a constant multiple of the absolute error an(x) π2(x) . In particular, the same conclusion about nmin(x) could be reached when considering| the− absolute| errors instead of relative errors. Since we plot results for two or three different (fixed) values of x in Figure 1, we can also observe that the relative error is (for many of the values of n) a decreasing function of x, although this does not look to be true for n =2 in Figure 1. To confirm this observation, we plot the behaviour of the relative error εn(x) as a function of x in Figure 2. We use the first eight values of n and confirm that the relative error εn(x) resembles a decreasing function of x for n =1, 3, 4, ..., 8, while ε2(x) reaches its minimum ON THE COUNTING FUNCTION OF SEMIPRIMES Page 11 of 13

(a) (b)

10 -1 10 -2

10 -2

10 -3 10 -3

10 -4 10 5 10 6 10 7 10 8 10 9 10 10 10 5 10 6 10 7 10 8 10 9 10 10

Figure 2. (a) Relative errors εn(x), for n =1, 2, 3 and 4, calculated by (4.5) as a function of x. The relative error of Landau’s approximation (4.2) is plotted as ε1(x). The relative error of the approximation given in Theorem 2.3 is plotted as ε2(x). (b) Relative errors εn(x), for n =5, 6, 7 and 8 as a function of x. between 2 105 and 3 105. For smaller values of x, the approximation a (x) overestimates × × 2 π2(x), while it is an underestimate for larger values of x. The graphs of a2(x) and π2(x) cross for the values of x between 2 105 and 3 105, so in this interval we can get very close to × × the correct answer, which results in the minimum of ε2(x) in Figure 2(a), because our error definition (4.5) includes the absolute value. In Figure 2, we also observe that the other errors are not strictly decreasing, but they fluctuate with a decreasing trend, see, for example, the plot of ε8(x) in Figure 2(b).

5. Discussion

In this paper, we have studied the behaviour of the semiprime counting function π2(x), which is a special case (k =2) of the k- counting function πk(x). To generalize the presented results to the case k 3, we need to first generalize the counting Lemma 2.1. Using the inclusion-exclusion principle,≥ it is possible to deduce the following counting formula k i 1 x πk(x)= ( 1) − πk i , (5.1) − − k p1p2 ...pi i=1 p1

x ∞ Q (log(log x)) N (x) n,k , k ∼ log x (log x)n n=0 X where Q are polynomials of degree k 1. Here, the expansion is similar to the expansion (1.4) n,k − for πk(x), but the polynomials Pn,k and Qn,k are different. Results about the leading terms of polynomials Qn,k and about Q0,k have also been obtained, as in the case of πk. Several different approximations for Nk(x) are also possible to derive, as shown in Tenenbaum [21], who points out that the function Nk is easier to analyse than πk, for larger values of k, relative to log(log x). For example, the following holds uniformly for x 3 and (2+ δ) log(log x) k A log(log x): ≥ ≤ ≤ 2 x log x δ /5 N (x)= C 1+ (log x)− , k 2k O where A> 0, 0 <δ< 1 and C 0.378694. Similar results, but for larger values of k, can be ≈ obtained for functions πk as well [16].

Acknowledgements. Authors would like to thank Julia Stadlmann for helpful comments during the preparation of this manuscript.

References 1. C. Axler. New bounds for the prime counting function. Integers, 16:A22, 2006. 2. C. Axler. On a family of functions defined over sums of primes. Journal of Integer Sequences, 22(5):Article 19.5.7, 2019. 3. J. Bohman and C. Fr¨oberg. The Stieltjes function – definition and properties. Mathematics of Computation, 51(163):281–289, 1988. 4. K. Broughan. Extension of the Riemann ζ-functions logarithmic derivative positivity region to near the critical strip. Canadian Mathematical Bulletin, 52(2):186–194, 2009. 5. N. de Bruijn. Asymptotic Methods in Analysis. North-Holland Publishing Co., Amsterdam, 1958. 6. H. Delange. Sur des formules de Atle Selberg. Acta Arithmetica, 19:105–146, 1971. ON THE COUNTING FUNCTION OF SEMIPRIMES Page 13 of 13

7. P. Diaconis. Asymptotic expansion for the mean and variance of the number of prime factors of a number n. Technical Report 96, Department of Statistics, Stanford University, Stanford, California, December 1976. 8. P. Dusart. Explicit estimates of some functions over primes. Ramanujan Journal, 45:227–251, 2018. 9. P. Erd˝os and M. Kac. The Gaussian law of errors in the theory of additive number theoretic functions. American Journal of Mathematics, 62(1):738–742, 1940. 10. P. Erd˝os and A. S´ark˝ozy. On the number of prime factors of integers. Acta Scientiarum Mathematicarum, 42:237–246, 1980. 11. S. Finch. Mathematical Constants II. Cambridge University Press, Cambridge, 2018. 12. C. Fr¨oberg. On the prime zeta function. BIT, 8:187–202, 1968. 13. A. Harper. Two new proofs of the Erd˝os-Kac theorem, with bound on the rate of convergence, by Stein’s method for distributional approximations. Mathematical Proceedings of the Cambridge Philosophical Society, 147(1):95114, 2009. 14. S. Ishmukhametov and F. Sharifullina. On distribution of semiprime numbers. Izvestiya Vysshikh Uchebnykh Zavedenii. Matematika, 8:53–59, 2014. 15. E. Landau. Handbuch der Lehre von der Verteilung der Primzahlen. Druck und Verlag von B.G.Teubner, Lepzig und Berlin, 1909. 16. J. Nicolas. Sur la distribution des nombres entiers ayant une quantit´efix´ee de facteurs premiers. Acta Arithmetica, 44(3):191–200, 1984. 17. A. R´enyi and P. Tur´an. On a theorem of Erd˝os-Kac. Acta Arithmetica, 4(1):71–84, 1958. 18. J. Rosser and L. Schoenfeld. Approximate formulas for some functions of prime numbers. Illinois Journal of Mathematics, 6(1):64–94, 1962. 19. J. Rosser and L. Schoenfeld. Sharper bounds for the Chebyshev functions θ(x) and ψ(x). Mathematics of Computation, 29(129):243–269, 1975. 20. L. Schoenfeld. Sharper bounds for the Chebyshev functions θ(x) and ψ(x). II. Mathematics of Computation, 30(134):337–360, 1976. 21. G. Tenenbaum. Introduction to Analytic and Probabilistic , volume 163 of Graduate Studies in Mathematics. American Mathematical Society, 2015. 22. T. Trudgian. Updating the error term in the prime number theorem. Ramanujan Journal, 39:225–234, 2016.

Dragos, Cris,an Radek Erban Merton College Mathematical Institute Merton Street University of Oxford Oxford OX1 4JD Woodstock Road United Kingdom Oxford OX2 6GG United Kingdom [email protected] [email protected]