arXiv:1612.01394v2 [math.NT] 15 Dec 2016 fti ucinwe t rueti large. is argument its when function this of (1) M¨obius function (3) (2) (4) (4-7): formula h etn function Mertens The oeie h bv ento a eetne ora number real to extended be can definition above the Sometimes hr h M¨obius function the where utemr,Mresfnto a te representations. other has function Mertens Furthermore, W LMNAYFRUA N OECOMPLICATED SOME AND FORMULAE ELEMENTARY TWO Abstract. inwt h uuaiesmo h qaereitgr,are integers, squarefree neighbo the of two sum empirically. between cumulative maximum/minimum the with local tion 10043 the zeros, hs formulae, these etdb computer. by mented 2 etn ucinEeetr oml eo oa maximum/m Local Zeros formula Elementary function Mertens Keywords: × 10 7 ape,sm ftecmlctdpoete o etn fun Mertens for properties complicated the of some samples, µ ( µ k RPRISFRMRESFUNCTION MERTENS FOR PROPERTIES w lmnayfrua o etn function Mertens for formulae elementary Two ( = ) k o l oiieintegers positive all for ) M    ( n a ecluae ietyadsml,wihcnb aiyi easily be can which simply, and directly calculated be can ) M ( − M ( 0 1 1) n (1) µ siprati ubrter,epcal h calculation the especially theory, number in important is ) m M ( k ∼ ( sdfie o oiieinteger positive a for defined is ) if x if k M M = ) 1. OGQAGWEI QIANG RONG k M 1 = (2 k ( stepoutof product the is Introduction x ( × sdvsbeb rm square prime a by divisible is 2 n = ) 1 πi 10 = ) 7 Z r acltdoeb n.Bsdo these on Based one. by one calculated are ) 1 M 1 ≤ c X X k − n c =1 k n ( + i , ≤ n ∞ i x ∞ µ sdfie stecmltv u fthe of sum cumulative the as defined is ) µ ( k sζ ( k ) x ( ) s nmmsurfe integers squarefree inimum s ) m d s itntprimes distinct nesodnmrclyand numerically understood M ( n hyaemil hw in shown mainly are They r band With obtained. are ) eo,adterela- the and zeros, r ction sfollows: as s k by M ( n ,is16479 its ), mple- 2 RONG QIANG WEI

where ζ(s) is the the , s is complex, and c> 1

(5) M(n)= exp(2πia)

aX∈Fn

where Fn is the of order n.

n n n n n n n n n a≤n a≤ b b≤ a a≤ bc b≤ ac b≤ ab a≤ bcd b≤ acd b≤ abd b≤ abc (6) M(n) = 1 1+ 1 1+ 1 . . . − − Xa=2 Xa=2 Xb=2 Xa=2 Xb=2 Xc=2 Xa=2 Xb=2 Xc=2 Xd=2 Formula (6) shows M(n) is the sum of the number of points under n-dimensional hyper- boloids.

(7) M(n) = detRn×n where R is the Redheffer matrix. R = r is defined by r = 1 if j = 1 or i j, and { ij} ij | rij = 0 otherwise. However, none of the representations above results in practical algorithms for calculating the Mertens function. At present, many algorithms are based or partially based on sieving similar to those used in prime counting (eg., Kotnik and van de Lune, 2004; Kuznetsov, 2011; Hurst, 2016). With the sieve algorithm, M(x) has been computed for all x 1022(Kuznetsov, 2011). For the isolated values of Mertens function M(n), M(2n) has been≤ computed for all positive integers n 73 with combinatorial algorithm (partially sieving) (Hurst, 2016). ≤ On the other hand, there are also some (recursive) formulae for Mertens function M(n) in the mathematical literature by which the practical algorithms for the M(n) can be obtained (eg., Neubauer, 1963; Dress, 1993; Benito and Varona 2008; and the references therein). For example, Benito and Varona (2008) present a two-parametric family of recursive formula as follows,

n r+1 2M(n)+3 = ⌊ ⌋ g(n, k)µ(k) k=1 sP (8) n n n n + [M( 3+6b ) 2M( 5+6b ) + 3M( 6+6b ) 2M( 7+6b )] b=0 − − Pr + h(a)[M( n ) M( n )] a − a+1 a=6Ps+9 where n, r, and s are three integers such that s 0 and 6s + 9 r n 1. g(n, k) = 3 n 2 n 1 . h(a)= g(n, k) for n < k n .≥ ≤ ≤ − ⌊ 3k ⌋− ⌊ 2k − 2 ⌋ a+1 ≤ a Here we introduce two new elementary formulae to calculate the M(n) which are not based on sieving. We calculate Mertens function from M(1) to M(2 107) with these formulae one by one, and study some properties of the M(n) numerically× and empirically. TWO ELEMENTARY FORMULAE AND SOME COMPLICATED PROPERTIES FOR MERTENS FUNCTION3

2. Two elementary formulae for Mertens function In Wei (2016), a definite recursive relation for M¨obius function is introduced by two simple ways. One is from M¨obius transform, and the other is from the submatrix of the Redheffer Matrix. The recursive relation for M¨obius function µ(k) is,

k−1 1 m k (9) µ(k)= lkmµ(m), k = 2, 3, ; lkm = | − · · ·  0 else mX=1 and µ(1) = 1. From formula (9), two elementary formulae for Mertens function M(n) can be obtained as follows,

n n k−1 1 m k (10) M(n)= µ(k)=1+ [ lkmµ(m)], k = 2, 3, ; lkm = | − · · ·  0 else Xk=1 Xk=2 mX=1

n−1 1 m n (11) M(n)= M(n 1) lnmµ(m),n = 2, 3, ; lnm = | − − · · ·  0 else mX=1 where M(1)=1. With formula (10) or (11), M(n) can be calculated directly and the most complex operation is only the Mod. We calculated the Mertens function from M(1) to M(2 107) one by one. Some values of the M(n) are listed in Table 1. ×

Table 1: Some values of the Mertens function M(n)

n M(n) n M(n) n M(n) n M(n) n M(n) n M(n) 10 -1 20 -3 30 -3 40 0 50 -3 60 -1 102 1 2 102 -8 3 102 -5 4 102 1 5 102 -6 6 102 4 103 2 2 × 103 5 3 × 103 -6 4 × 103 -9 5 × 103 2 6 × 103 0 104 -23 2 × 104 26 3 × 104 18 4 × 104 -10 5 × 104 23 6 × 104 -83 105 -48 2 × 105 -1 3 × 105 220 4 × 105 11 5 × 105 -6 6 × 105 -230 106 212 2 × 106 -247 3 × 106 107 4 × 106 192 5 × 106 -709 6 × 106 257 107 1037 2 × 107 -953 3.5× 106 -138 4.5× 106 173 5.5× 106 -513 6.5× 106 867 × × × × ×

3. Some complicated properties for Mertens function M(n) 3.1. Variation of Mertens function M(n) with n. Figure 1 shows the Mertens function M(n) to n = 5 105, n = 1 106, n = 1.5 107, and n = 2 107, respectively. It can be found the distribution× of Mertens× function M× (n) is complicated.× It oscillates up and down 4 RONG QIANG WEI with increasing amplitude over n, but grows slowly in the positive or negative directions until it increases to a certain peak value.

n=5000000 n=10000000 800 1500 600 1000 400 500 200 ) ) n n

( 0 ( 0

M -200 M -500 -400 -1000 -600 -800 -1500 0 1 2 3 4 5 0 2 4 6 8 10 n ×106 n ×106

n=15000000 n=20000000 1500 1500

1000 1000

500 500 ) ) n n

( 0 ( 0 M M -500 -500

-1000 -1000

-1500 -1500 0 5 10 15 0 0.5 1 1.5 2 n ×106 n ×107

Fig. 1: Mertens function M(n) to n = 5 105, 1 106, 1.5 107, 2 107. × × × × To investigate further the complicated properties of the M(n), a sequence composed of M(1) M(5 105) is analyzed by the method of empirical mode decomposition (EMD) (Tan,− 2016). This× sequence is decomposed into a sum of 19 empirical modes. Some models are shown in Figure 2-3. It can be seen that the empirical modes are still complicated except 16th-19th modes. The fundamental mode (the last mode in Figure 3) is a simple parabola going downward. These empirical modes show further that the Mertens function M(n) has complicated behaviors. It can be found that there is a different variation of the Mertens function M(n) with n in a log-log space. Figure 4 shows the absolute value of the Mertens function M(n) to n = 2 107 in such a space. It can be found M(n) still oscillates but increases| generally| with n×. It seems that the outermost values of| M(n|) increase almost linearly with n, but they are less than those from √n. | | It seems from Figure 1 and 4 to the M(n) has some fractal properties. We check this by estimating M(n)’s power spectral density (PSD). We calculate the PSD for M(n) sequence from M(1) to M(2 107) by taking n as time. The result is shown in Figure 5. It can be found that the logarithmic× PSD of M(n) has a linear decreasing trend with increasing logarithmic frequency, which does indicate that M(n) has some fractal properties. However, the M¨obius function µ(n), which is taken as an independent random sequence in Wei (2016), has no such properties. Its cumulative sum, M(n) reduces partly the randomness. TWO ELEMENTARY FORMULAE AND SOME COMPLICATED PROPERTIES FOR MERTENS FUNCTION5

20 10 0 -10 -20 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 ×105 40 20 0 -20 -40 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 ×105 50

0

-50 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 ×105 100 50 0 -50 -100 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 n ×105

Fig. 2: The 9th-12th (from the top to the bottom) empirical modes of the sequence com- posed of M(1) M(5 105) − ×

10 0 -10 -20 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 ×105

20

0

-20 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 ×105

15 10 5 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 n ×105

Fig. 3: The 17th-19th (from the top to the bottom) empirical modes of the sequence composed of M(1) M(5 105) − ×

3.2. Zeros of the Mertens function M(n). It is interesting to investigate the distri- bution of the zeros of the Mertens function M(n). Our calculation shows that there are 6 RONG QIANG WEI

104

103 | )

n 2 ( 10 M |

101

100 100 101 102 103 104 105 106 107 108 n

Fig. 4: The absolute value of the Mertens function M(n) to n = 2 107. The dash line is × √n.

1015

1010

105

Magnitude 100

10-5

10-10 10-8 10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 Frequency

Fig. 5: The power spectral density (PSD) for M(n) sequence from M(1) to M(2 107). ×

16479 zeros among these 2 107 values of the M(n), which are shown in the top subfigure of the Figure 6. It can be× seen that the zeros are uneven in our computational domain. TWO ELEMENTARY FORMULAE AND SOME COMPLICATED PROPERTIES FOR MERTENS FUNCTION7

Zeros are denser from 1 to 4 106, and at 8 106. The bottom subfigure of the Figure 6 shows the comparison of the× zeros of the Mertens∼ × function M(n) and those of the M¨obius function µ(n) in our computational domain. One can see that the (7841425) zeros of the µ(n) are much denser than those of the M(n).

1

0.5

✭ 0 ▼

-0.5

-1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

7 ✦ ♥ 10

1

➭ (n) M(n)

0.5

✭ 0 ▼

-0.5

-1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

7 ✦ ♥ 10

Fig. 6: Distribution of the zeros of the Mertens function M(n) when n [1, 2 107] (Top); Comparison of the zeros of the Mertens function M(n) with those of the∈ M¨obius× function µ(n)(Bottom).

3.3. The local maximum/minimum of the Mertens function M(n) between two neighbor zeros. Another important property for the Mertens function M(n) is the local maximum/minimum of the M(n) between two neighbor zeros. Here the ”local” means that the sequence of M(n) must have three values at least including the neighbor zeros. Figure 7 shows the variation of such 10043 local maximum/minimum of M(n) (5040 positive values and 5003 minus values) from M(1) to M(2 107) with n. One| can see| that the logarithms of the these local maximum/minimum have× the similar properties to log( M(n) ) vs. log(n) in Figure 4. It should be pointed out that the local maximum/minimum| here| is counted only once when duplicate or more n have the same local maximum/minimum between two neighbor zeros. The maximum of these 2 107 M(n)s is 1240 when n = 10195458, 10195467, 10195468, 10195522; And the minimum× is 1447 when n = 12875814, 12875815, 12875816, 12875818. − 8 RONG QIANG WEI

104

✰ ♣ ✮ 2

10

✭ ▼

100

100 101 102 103 104 105 106 107 108 ♥

104

✦ ♣ ✮ 2

10

▼ ⑤ 100

100 101 102 103 104 105 106 107 108 ♥

104

♣ ✮

2

✭ 10

▼ ⑤

100

100 101 102 103 104 105 106 107 108 ♥

Fig. 7: Variation of the local maximum/minimum of the M(1) M(2 107) with n − × between two neighbor zeros. The red straight line in each subfigure is √n. Top: 5040 maximum values of M(1) M(2 107); Middle: 5003 minimum values; Bottom: All the maximum/minimum (solid− circle:× maximum; solid square: minimum). In the middle and bottom subfigures, the absolute of the minimums are used.

4. Discussions 4.1. The calculation of M(n) with the relation (10) or (11). In theory, we can calculate M(n) for any large n with the relation (10) or (11) obtained in section 2. The algorithm is not complicated and can be implemented easily, even by hand. The most operation is only Mod. However, in order to calculate M(n) with the relation (10), it demands µ(2),µ(3),...µ(n 1) firstly, or M(1), M(2), . . . , M(n 1) if the relation (11) is − − used. Above all, we have to recalculate lkm or lnm firstly when k or n changes. It will take a lot of calculation time, especially when n is large. It took about 78326s to get µ(5500000). It can be also found that the relation here is not efficient for the isolated M(n). In this paper, we only calculate the values of M(n) from M(1) to M(2 107) because of the limitation of our desktop computer and computing time. To obtain more× numerical results of M(n) with large n, both the faster and/or optimization algorithm for the relation (10) or (11) here, or other professional and efficient algorithms, are required.

4.2. Upper bound of M(n) sequence. In Wei (2016), the upper bound of M(n) sequence is discussed based on the assumption that µ(n) is an independent random sequence, be- cause of the numerical consistency between empirical statistical quantities for only 2 107 × TWO ELEMENTARY FORMULAE AND SOME COMPLICATED PROPERTIES FOR MERTENS FUNCTION9

µ(n) and those from . The following inequality (12) for M(n) holds with a probability of 1 α, − 6 (12) M(n) K α √n ≤ rπ2 2 where,

Kα/2 1 t2 (13) exp( )dt = 1 α Z √2π − 2 − −Kα/2 or, the following inequality (14) holds with a probability p> 1 α − 6/π2 (14) M(n) √n ≤ p√α

0.61

0.6095

0.609 | )

n 0.6085 ( M |

n 0.608 − | µ | 0.6075 P 0.607

0.6065

0.606 0 2 4 6 8 10 12 14 16 18 n ×106

0.61

0.6095

0.609 )

n 0.6085 ( M

n 0.608 − | µ | 0.6075 P

0.607

0.6065

0.606 2 4 6 8 10 12 14 16 18 n ×106

P |µ(n)| |M(n)| 7 Fig. 8: Top: Variation of n n with n from n = 1 to n = 2 10 . Bottom: P |µ(n)| P µ(n) − 7 × Variation of n n with n from n = 1 to n = 2 10 . The red line in each 6 − × subfigure is π2 . 10 RONG QIANG WEI

Here without taking µ(n) as an independent random sequence, we conjecture that the upper bound of the M(n) should have a similar formula to (12) or (14) but the coefficient before √n will be very large from some facts as the follows: Fact 1. According to Hardy and Wright (2008), we have,

6 1/2 (15) µ(n) = 2 n + O(n ) X | | π

(16) M(n)= µ(n)= o(n) X For a large n, from (15) we have,

6 6 1 2 (17) µ(n) 2 n = µ(n) 2 n An | X | |− π | X | |− π ≤ where A is a constant. Then,

µ(n) 6 1 (18) | | An− 2 P n − π2 ≤ According to (16), M(n) = o(n). We have, | |

µ(n) 6 M(n) 1 (19) | | | | A n− 2 P n − π2 − n ≤ 1 where A1 < A is another constant for a large n. Further,

6 1 2 (20) µ(n) 2 n M(n) A1n X | |− π − | |≤ Comparing (20) and (17), one can get,

1 1 (21) M(n) (A A )n 2 = Cn 2 | |≤ − 1 where C is constant for a large n.

Fact 2. According to Hardy and Wright (2008), among the squarefree numbers those for which µ(n) = 1 and those for which µ(n) = 1 occur with about the same frequency 6 1/2− for M(n)= o(n). Since µ(n) = 2 n + O(n ), we have, | | π P ne 3 1/2 (22) µ(n) + µ(n) = 2 1 = 2[ 2 ne + O(ne )] X | | X X π

no 3 1/2 (23) µ(n) µ(n)= (2 1) = 2[ 2 no + O(no )] X | |− X − X − π TWO ELEMENTARY FORMULAE AND SOME COMPLICATED PROPERTIES FOR MERTENS FUNCTION11

where ne is squarefree with even number of distinct prime factors, no with odd number of distinct prime factors. Thus, we have,

6 1/2 (24) µ(n) + µ(n) 2 ne A1ne X | | X − π ≤

6 1/2 (25) µ(n) µ(n) 2 no A2no X | |− X − π ≤ where 0 < A2 < A1 are two different constants for a large n. Because those for which µ(n) = 1 and those for which µ(n)= 1 occur with about the ′ − same frequency among the squarefree numbers, ne = no = n for a large n. And from (24) and (25), we have,

A A (26) µ(n) 1 − 2 n′1/2 = Cn′1/2 Cn1/2 X ≤ 2 ≤ where C is a constant for a large n.

Fact 3. From (15) and (16), (22) and (23), when n is large, the following should be true:

µ(n) M(n) 6 (27) | | | | = P n − n π2

µ(n) µ(n) 6 (28) | | = P n − P n π2 The variations of P |µ(n)| |M(n)| and P |µ(n)| P µ(n) with n from n = 1 to n = n − n n − n 2 107 are shown in Figure 8, respectively. It can be found, with increasing n, the values 7 7 × 6 P |µ(2×10 )| |M(2×10 )| above are close to the constant π2 . The absolute error for 2×107 2×107 and 7 7 − P |µ(2×10 )| P µ(2×10 ) 6 −5 −5 2×107 2×107 to π2 are 4.6002 10 and 4.928 10 respectively. − − × × 1 These above means that the order of the Mertens function M(n) should be about O(n 2 ), 1 2 +ε 1 even O(n ) with 0 ε< 2 . If so, a better result in Ramar´e (2013) can infer M(n) should 1 ≤ 1 be about O(0.5n 2 ) for n 10, even O(0.1333n 2 ) for n 1664. Based on these three facts,≥ we conjecture that M(n)≥ should have a similar formula to (12) or (14) for the upper bound of the M(n) like the following,

C > 0 and C is very large, n , n>n ∃ ∃ 0 ∀ 0

(29) M(n) Cn1/2 ≤ 12 RONG QIANG WEI

5. Conclusions Based on the results and discussion above, some conclusions can be drawn as follows, (1) Two elementary formulae for the Mertens function M(n) are obtained, based on the definite recursive relation for M¨obius function introduced in Wei (2016). With these formulae, M(n) can be calculated directly and simply. The most complex operation is only the Mod. However, in the calculation both the efficient and/or optimization algorithm for this relation are required when n is large. (2) With this relation, M(1) M(2 107) are calculated one by one. Numerical results show that Mertens function∼ M(n)× have complicated properties. The sequence of M(1) M(2 107) has 19 empirical modes, 16479 zeros, 10043 local maximums/minimums between∼ two× neighbor zeros, a maximum of 1240, and a minimum of -1447. (3) We also calculated the variation of P |µ(n)| |M(n)| and P |µ(n)| M(n) from n = 1 n − n n − n to n = 2 107, respectively. Numerical results show that these values are close to the ×6 constant π2 with increasing n.

Acknowledges We thank Dana Jacobsen very much for pointing out the incorrect values about Mertens function M(n) in this e-print and very good comments on the calculating for M(n). We also thank Alisa Sedunova for his very good suggestions.

References

Benito M, Varona J L, 2008, Recursive formulae related to the summation of the M¨obius function, The Open Mathematics Journal, 1: 25-34 TWO ELEMENTARY FORMULAE AND SOME COMPLICATED PROPERTIES FOR MERTENS FUNCTION13

Dress F, 1993, Fonction sommatiore de la fonction de M¨obius. I. Majorations exp´erimentales. Experiment. Math, 2: 89-98. Hardy G H, Wright E M. An introduction to the theory of numbers (Sixth Edition). Oxford University Press, 2008 Hurst G, Computations of the Mertens Function and Improved Bounds on the , arXiv:1610.08551, 2016 Kotnik T, van de Lune J, 2004, On the Order of the Mertens Function, Experimental Mathematics, 13 (4): 473-481 Kuznetsov E, Computing the Mertens function on a GPU, arXiv:1108.0135, 2011 Neubauer G, 1963, Eine empirische Untersuchung zur Mertensschen Funktion. Numer. Math. 5: 1-13. Ramar´e O, From explicit estimates for primes to explicit estimates for the Mbius function. Acta Arithmetica, 2013, 157: 365-379. Tan A, 2016, Hilbert-Huang Transform, http://cn.mathworks.com/matlabcentral/fileexchange/19681-hilbert-huang-transform Wei RQ, 2016, A recursive relation and some statistical properties for the M¨obius function, International Journal of Mathematics and Computer Science, 11(2): 215-248

College of Earth Sciences, University of Chinese Academy of Sciences, Beijing, PRC, 100049 E-mail address: [email protected]