cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A002321 Mertens's function: Sum_{k=1..n} mu(k), where mu is the Moebius function A008683.

Original entry on oeis.org

1, 0, -1, -1, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -1, -1, -2, -2, -3, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -3, -4, -4, -3, -2, -1, -1, -2, -1, 0, 0, -1, -2, -3, -3, -3, -2, -3, -3, -3, -3, -2, -2, -3, -3, -2, -2, -1, 0, -1, -1, -2, -1, -1, -1, 0, -1, -2, -2, -1, -2, -3, -3, -4, -3, -3, -3, -2, -3, -4, -4, -4
Offset: 1

Views

Author

Keywords

Comments

Partial sums of the Moebius function A008683.
Also determinant of n X n (0,1) matrix defined by A(i,j)=1 if j=1 or i divides j.
The first positive value of Mertens's function for n > 1 is for n = 94. The graph seems to show a negative bias for the Mertens function which is eerily similar to the Chebyshev bias (described in A156749 and A156709). The purported bias seems to be empirically approximated to - (6 / Pi^2) * (sqrt(n) / 4) (by looking at the graph) (see MathOverflow link, May 28 2012) where 6 / Pi^2 = 1 / zeta(2) is the asymptotic density of squarefree numbers (the squareful numbers having Moebius mu of 0). This would be a growth pattern akin to the Chebyshev bias. - Daniel Forgues, Jan 23 2011
All integers appear infinitely often in this sequence. - Charles R Greathouse IV, Aug 06 2012
Soundararajan proves that, on the Riemann Hypothesis, a(n) << sqrt(n) exp(sqrt(log n)*(log log n)^14), sharpening the well-known equivalence. - Charles R Greathouse IV, Jul 17 2015
Balazard & De Roton improve this (on the Riemann Hypothesis) to a(n) << sqrt(n) exp(sqrt(log n)*(log log n)^k) for any k > 5/2, where the implied constant in the Vinogradov symbol depends on k. Saha & Sankaranarayanan reduce the exponent to 5/4 on additional hypotheses. - Charles R Greathouse IV, Feb 02 2023

Examples

			G.f. = x - x^3 - x^4 - 2*x^5 - x^6 - 2*x^7 - 2*x^8 - 2*x^9 - x^10 - 2*x^11 - 2*x^12 - ...
		

References

  • E. Landau, Vorlesungen über Zahlentheorie, Chelsea, NY, Vol. 2, p. 157.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • F. Mertens, "Über eine zahlentheoretische Funktion", Akademie Wissenschaftlicher Wien Mathematik-Naturlich Kleine Sitzungsber, IIa 106, (1897), p. 761-830.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section VI.1.
  • Biswajyoti Saha and Ayyadurai Sankaranarayanan, On estimates of the Mertens function, International Journal of Number Theory, Vol. 15, No. 02 (2019), pp. 327-337.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. von zur Gathen and J. Gerhard, Modern Computer Algebra, Cambridge, 1999, see p. 482.

Crossrefs

First column of A134541.
First column of A179287.

Programs

  • Haskell
    import Data.List (genericIndex)
    a002321 n = genericIndex a002321_list (n-1)
    a002321_list = scanl1 (+) a008683_list
    -- Reinhard Zumkeller, Jul 14 2014, Dec 26 2012
    
  • Magma
    [&+[MoebiusMu(k): k in [1..n]]: n in [1..81]]; // Bruno Berselli, Jul 12 2021
  • Maple
    with(numtheory); A002321 := n->add(mobius(k),k=1..n);
  • Mathematica
    Rest[ FoldList[ #1+#2&, 0, Array[ MoebiusMu, 100 ] ] ]
    Accumulate[Array[MoebiusMu,100]] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    a(n) = sum( k=1, n, moebius(k))
    
  • PARI
    a(n) = if( n<1, 0, matdet( matrix(n, n, i, j, j==1 || 0==j%i)))
    
  • PARI
    a(n)=my(s); forsquarefree(k=1,n, s+=moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy import mobius
    def M(n): return sum(mobius(k) for k in range(1,n + 1))
    print([M(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 18 2017
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A002321(n):
        if n == 0:
            return 0
        c, j = n, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A002321(k1)
            j, k1 = j2, n//j2
        return j-c # Chai Wah Wu, Mar 30 2021
    

Formula

Assuming the Riemann hypothesis, a(n) = O(x^(1/2 + eps)) for every eps > 0 (Littlewood - see Landau p. 161).
Lambert series: Sum_{n >= 1} a(n)*(x^n/(1-x^n)-x^(n+1)/(1-x^(n+1))) = x and -1/x. - Mats Granvik, Sep 09 2010 and Sep 23 2010
a(n)+2 = A192763(n,1) for n>1, and A192763(1,k) for k>1 (conjecture). - Mats Granvik, Jul 10 2011
Sum_{k = 1..n} a(floor(n/k)) = 1. - David W. Wilson, Feb 27 2012
a(n) = Sum_{k = 1..n} tau_{-2}(k) * floor(n/k), where tau_{-2} is A007427. - Enrique Pérez Herrero, Jan 23 2013
a(n) = Sum_{k=1..A002088(n)} exp(2*Pi*i*A038566(k)/A038567(k-1)) where i is the imaginary unit. - Eric Desbiaux, Jul 31 2014
Schoenfeld proves that |a(n)| < 5.3*n/(log n)^(10/9) for n > 1. - Charles R Greathouse IV, Jan 17 2018
G.f. A(x) satisfies: A(x) = (1/(1 - x)) * (x - Sum_{k>=2} (1 - x^k) * A(x^k)). - Ilya Gutkovskiy, Aug 11 2021

A087987 a(n) is the Mertens function value at the n-th primorial number.

Original entry on oeis.org

0, -1, -3, -1, -1, 16, -25, 278, 3516, -5012, -30431, -234676, -4247453, -6271957, 177533446, -416214476
Offset: 1

Views

Author

Labos Elemer, Oct 02 2003

Keywords

Examples

			n = 3: 3rd primorial number = 30. A002321(30) = -3.
		

Crossrefs

Programs

  • Mathematica
    q[x_] := Apply[Times, Table[Prime[i], {i, 1, x}]] s=0; i=1; Do[While[i<=q[n], s=s+MoebiusMu[i]; i++ ]; Print[s], {n, 0, 8}]//Timing
  • PARI
    p=1; s=1; for(n=1,10,pr=p; p*=prime(n); s+=sum(k=pr+1, p, moebius(k)); print1(s",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 21 2007
    
  • Perl
    use ntheory ":all"; say mertens(pn_primorial($)) for 1..12; # _Dana Jacobsen, May 22 2015

Formula

a(n) = A002321(A002110(n)).

Extensions

One more term from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 21 2007
a(10)-a(11) from Donovan Johnson, Jun 21 2012
a(12)-a(13) from Rikard Nordgren, Nov 11 2012
a(14) from Chai Wah Wu, Apr 24 2021
a(15)-a(16) from Henri Lifchitz, Nov 10 2024

A348708 Number of squarefree integers with an odd number of prime factors <= 10^n.

Original entry on oeis.org

0, 4, 30, 303, 3053, 30421, 303857, 3039127, 30395383, 303963673, 3039652332, 30396399068, 303963519954, 3039635209356, 30396355530761, 303963552535238, 3039635510867921, 30396355103617024, 303963550950390745, 3039635508820145344, 30396355092470750098, 303963550928711270447
Offset: 0

Views

Author

Giorgos Kalogeropoulos, Oct 30 2021

Keywords

Comments

a(n) is the number of integers k <= 10^n with mu(k)=-1 where mu(k) is the Möbius function.

Examples

			a(1) = 4 because there are 4 squarefree integers with an odd number of prime factors <= 10: 2, 3, 5, 7.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@Select[Range[10^n],MoebiusMu@#==-1&],{n,0,6}]

Formula

a(n) = (A071172(n) - A084237(n)) / 2.
Lim_{n->oo} a(n)/10^n = 3/Pi^2 (A104141).

A348709 Number of squarefree integers with an even number of prime factors <= 10^n.

Original entry on oeis.org

1, 3, 31, 305, 3030, 30373, 304069, 3040164, 30397311, 303963451, 3039618610, 30396311212, 303963582320, 3039635808938, 30396354655186, 303963549318865, 3039635507672484, 30396355081786770, 303963550903632005, 3039635509720135531, 30396355092931863204, 303963550925315375170
Offset: 0

Views

Author

Giorgos Kalogeropoulos, Oct 30 2021

Keywords

Comments

a(n) is the number of integers k <= 10^n with mu(k)=1 where mu(k) is the Möbius function.

Examples

			a(1) = 3 because there are 3 squarefree integers with an even number of prime factors <= 10: 1, 6, 10.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@Select[Range[10^n],MoebiusMu@#==1&],{n,0,6}]

Formula

a(n) = (A071172(n) + A084237(n)) / 2.
Lim_{n->oo} a(n)/10^n = 3/Pi^2 (A104141).

A087989 a(n) = M(n!), the value of Mertens's function at the n-th factorial.

Original entry on oeis.org

1, 1, 0, -1, -2, -3, -3, -6, -15, -138, -26, -527, -3474, -19550, -20014, 3084, -1253696, 7121000, -18636176, -44667415, 94933922, -848322099
Offset: 0

Views

Author

Labos Elemer, Oct 02 2003

Keywords

Examples

			a(4) = A002321(4!) = A002321(24) = -2.
		

Crossrefs

Programs

  • Mathematica
    s=0; i=1; Do[While[i<= n!, s=s+MoebiusMu[i]; i++ ]; Print[s], {n, 0, 10}]
  • PARI
    a(n)=sum(k=1,n!,moebius(k)) \\ Charles R Greathouse IV, Apr 02 2014

Formula

a(n) = A002321(A000142(n)).

Extensions

More terms from Sean A. Irvine, Dec 06 2009
a(14) from Donovan Johnson, Jun 21 2012
a(15)-a(17) from Rikard Nordgren, Nov 10 2012
a(18)-a(21) from Henri Lifchitz, Nov 10 2024

A189020 a(n) = Sum_{k=1..10^n} tau_4(k), where tau_4 is the number of ordered factorizations into 4 factors (A007426).

Original entry on oeis.org

1, 89, 3575, 93237, 1951526, 35270969, 578262093, 8840109380, 128217432396, 1784942188189, 24045237260214, 315312623543840, 4042957241191810, 50862246063060180, 629513636928477232, 7681900592647818929, 92587253467765253144, 1103781870246459696784, 13031388731053572679450, 152516435040764735691556, 1771079109308495896176156
Offset: 0

Views

Author

Andrew Lelechenko, Apr 15 2011

Keywords

Comments

Using that tau_4 = tau_2 ** tau_2, where ** means Dirichlet convolution and tau_2 is (A000005), one can calculate a(n) faster than in O(10^n) operations - namely in O(10^(3n/4)) or even in O(10^(2n/3)). See links for details.

Crossrefs

Cf. A057494 - partial sums up to 10^n of the divisors function tau_2 (A000005), A180361 - of the unitary divisors function tau_2* (A034444), A180365 - of the 3-divisors function tau_3 (A007425).
Also see A072692 for such sums of the sum of divisors function (A000203), A084237 for sums of Moebius function (A008683), A064018 for sums of Euler totient function (A000010).

Formula

a(n) = A061202(10^n) = Sum_{k=1..10^n} A007426(n).

Extensions

a(16)-a(20) from Henri Lifchitz, Feb 05 2025

A201740 The value of the Mertens function at n^n.

Original entry on oeis.org

1, -1, -1, -1, 4, 39, -158, 211, -186, -33722, 55130, 192039, -4032991
Offset: 1

Views

Author

Carl Najafi, Dec 04 2011

Keywords

References

  • Marc Deleglise and Joel Rivat, Computing the summation of the Mobius function, Experiment. Math. 5 (1996), no. 4, 291-295.

Crossrefs

Programs

  • Mathematica
    Table[Sum[MoebiusMu[k], {k, n^n}], {n, 7}]

Formula

a(n) = A002321(n^n).

Extensions

a(9)-a(10) from Max Alekseyev, Dec 10 2011
a(11) from Donovan Johnson, Jun 21 2012
a(12)-a(13) from Rikard Nordgren, Nov 10 2012
Showing 1-7 of 7 results.