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-10 of 66 results. Next

A127173 T(n,k) = A007427(n/k) if k divides n, T(n,k) = 0 otherwise.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jan 06 2007

Keywords

Examples

			First few rows of the triangle:
   1;
  -2,  1;
  -2,  0,  1;
   1, -2,  0,  1;
  -2,  0,  0,  0,  1;
   4, -2, -2,  0,  0, 1;
  -2,  0,  0,  0,  0, 0, 1;
   0,  1,  0, -2,  0, 0, 0, 1;
   1,  0, -2,  0,  0, 0, 0, 0, 1;
   4, -2,  0,  0, -2, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Row sums are A008683.
Column 1 is A007427.

Programs

  • PARI
    \\ here b(n) is A007427(n).
    b(n)={sumdiv(n, d, moebius(d) * moebius(n/d))}
    T(n,k)={if(n%k==0, b(n/k), 0)} \\ Andrew Howroyd, Feb 20 2022

Formula

Square of A054525 as lower triangular matrix.
A007431(n) = Sum_{k=1, n} k*T(n,k).
A007428(n) = Sum_{k=1..n} mu(k)*T(n,k).

Extensions

Missing a(10)-a(14) and a(56) and beyond from Andrew Howroyd, Feb 20 2022

A130094 A051731 * an infinite lower triangular matrix with A007427 in the main diagonal.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, May 06 2007

Keywords

Comments

Right border = A007427. Row sums = mu(n), A008683. Nonzero terms by rows are substituted for the factors of n such that row sums = mu(n). Example: for row 6 we map (1, -2, -2, 0, 4), sum = 1, since the factors of 6 are 1, 2, 3 and 6.

Examples

			First few rows of the triangle are:
  1;
  1, -2;
  1,  0, -2;
  1, -2,  0,  1;
  1,  0,  0,  0, -2;
  1, -2, -2,  0,  0,  4;
  1,  0,  0,  0,  0,  0, -2;
  1, -2,  0,  1,  0,  0,  0,  0;
  1,  0, -2,  0,  0,  0,  0,  0,  1;
  ...
		

Crossrefs

Formula

Inverse Möbius transform of a triangular matrix with A007427 in the main diagonal and the rest zeros.

A161780 Square array read by antidiagonals up. Redheffer type matrix. A007427 interleaved with k-1 zeros in the columns.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Jun 19 2009

Keywords

Comments

The determinant of this matrix is A006218.

Examples

			Table begins:
..1..1..1..1..1..1..1..1
.-2..1..0..0..0..0..0..0
.-2..0..1..0..0..0..0..0
..1.-2..0..1..0..0..0..0
.-2..0..0..0..1..0..0..0
..4.-2.-2..0..0..1..0..0
.-2..0..0..0..0..0..1..0
..0..1..0.-2..0..0..0..1
		

Crossrefs

Programs

  • Excel
    =if(row()=1;1;if(mod(row();column())=0;1*lookup(row()/column();A000027;A007427);0))

A000005 d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 4, 4, 6, 2, 8, 2, 6, 4, 4, 4, 9, 2, 4, 4, 8, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 6, 2, 8, 4, 8, 4, 4, 2, 12, 2, 4, 6, 7, 4, 8, 2, 6, 4, 8, 2, 12, 2, 4, 6, 6, 4, 8, 2, 10, 5, 4, 2, 12, 4, 4, 4, 8, 2, 12, 4, 6, 4, 4, 4, 12, 2, 6, 6, 9, 2, 8, 2, 8
Offset: 1

Views

Author

Keywords

Comments

If the canonical factorization of n into prime powers is Product p^e(p) then d(n) = Product (e(p) + 1). More generally, for k > 0, sigma_k(n) = Product_p ((p^((e(p)+1)*k))-1)/(p^k-1) is the sum of the k-th powers of the divisors of n.
Number of ways to write n as n = x*y, 1 <= x <= n, 1 <= y <= n. For number of unordered solutions to x*y=n, see A038548.
Note that d(n) is not the number of Pythagorean triangles with radius of the inscribed circle equal to n (that is A078644). For number of primitive Pythagorean triangles having inradius n, see A068068(n).
Number of factors in the factorization of the polynomial x^n-1 over the integers. - T. D. Noe, Apr 16 2003
Also equal to the number of partitions p of n such that all the parts have the same cardinality, i.e., max(p)=min(p). - Giovanni Resta, Feb 06 2006
Equals A127093 as an infinite lower triangular matrix * the harmonic series, [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, May 10 2007
For odd n, this is the number of partitions of n into consecutive integers. Proof: For n = 1, clearly true. For n = 2k + 1, k >= 1, map each (necessarily odd) divisor to such a partition as follows: For 1 and n, map k + (k+1) and n, respectively. For any remaining divisor d <= sqrt(n), map (n/d - (d-1)/2) + ... + (n/d - 1) + (n/d) + (n/d + 1) + ... + (n/d + (d-1)/2) {i.e., n/d plus (d-1)/2 pairs each summing to 2n/d}. For any remaining divisor d > sqrt(n), map ((d-1)/2 - (n/d - 1)) + ... + ((d-1)/2 - 1) + (d-1)/2 + (d+1)/2 + ((d+1)/2 + 1) + ... + ((d+1)/2 + (n/d - 1)) {i.e., n/d pairs each summing to d}. As all such partitions must be of one of the above forms, the 1-to-1 correspondence and proof is complete. - Rick L. Shepherd, Apr 20 2008
Number of subgroups of the cyclic group of order n. - Benoit Jubin, Apr 29 2008
Equals row sums of triangle A143319. - Gary W. Adamson, Aug 07 2008
Equals row sums of triangle A159934, equivalent to generating a(n) by convolving A000005 prefaced with a 1; (1, 1, 2, 2, 3, 2, ...) with the INVERTi transform of A000005, (A159933): (1, 1,-1, 0, -1, 2, ...). Example: a(6) = 4 = (1, 1, 2, 2, 3, 2) dot (2, -1, 0, -1, 1, 1) = (2, -1, 0, -2, 3, 2) = 4. - Gary W. Adamson, Apr 26 2009
Number of times n appears in an n X n multiplication table. - Dominick Cancilla, Aug 02 2010
Number of k >= 0 such that (k^2 + k*n + k)/(k + 1) is an integer. - Juri-Stepan Gerasimov, Oct 25 2015
The only numbers k such that tau(k) >= k/2 are 1,2,3,4,6,8,12. - Michael De Vlieger, Dec 14 2016
a(n) is also the number of partitions of 2*n into equal parts, minus the number of partitions of 2*n into consecutive parts. - Omar E. Pol, May 03 2017
From Tomohiro Yamada, Oct 27 2020: (Start)
Let k(n) = log d(n)*log log n/(log 2 * log n), then lim sup k(n) = 1 (Hardy and Wright, Chapter 18, Theorem 317) and k(n) <= k(6983776800) = 1.537939... (the constant A280235) for every n (Nicolas and Robin, 1983).
There exist infinitely many n such that d(n) = d(n+1) (Heath-Brown, 1984). The number of such integers n <= x is at least c*x/(log log x)^3 (Hildebrand, 1987) but at most O(x/sqrt(log log x)) (Erdős, Carl Pomerance and Sárközy, 1987). (End)
Number of 2D grids of n congruent rectangles with two different side lengths, in a rectangle, modulo rotation (cf. A038548 for squares instead of rectangles). Also number of ways to arrange n identical objects in a rectangle (NOT modulo rotation, cf. A038548 for modulo rotation); cf. A007425 and A140773 for the 3D case. - Manfred Boergens, Jun 08 2021
The constant quoted above from Nicolas and Robin, 6983776800 = 2^5 * 3^3 * 5^2 * 7 * 11 * 13 * 17 * 19, appears arbitrary, but interestingly equals 2 * A095849(36). That second factor is highly composite and deeply composite. - Hal M. Switkay, Aug 08 2025

Examples

			G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 2*x^5 + 4*x^6 + 2*x^7 + 4*x^8 + 3*x^9 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
  • G. Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed, Chelsea Publishing Co., New York 1959 Part II, p. 345, Exercise XXI(16). MR0121327 (22 #12066)
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 55.
  • G. H. Hardy and E. M. Wright, revised by D. R. Heath-Brown and J. H. Silverman, An Introduction to the Theory of Numbers, 6th ed., Oxford Univ. Press, 2008.
  • K. Knopp, Theory and Application of Infinite Series, Blackie, London, 1951, p. 451.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Chap. II. (For inequalities, etc.)
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. Has many references to this sequence. - N. J. A. Sloane, Jun 02 2014
  • 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).
  • B. Spearman and K. S. Williams, Handbook of Estimates in the Theory of Numbers, Carleton Math. Lecture Note Series No. 14, 1975; see p. 2.1.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 285.
  • E. C. Titchmarsh, The Theory of Functions, Oxford, 1938, p. 160.
  • Terence Tao, Poincaré's Legacies, Part I, Amer. Math. Soc., 2009, see pp. 31ff for upper bounds on d(n).

Crossrefs

See A002183, A002182 for records. See A000203 for the sum-of-divisors function sigma(n).
For partial sums see A006218.
Factorizations into given number of factors: writing n = x*y (A038548, unordered, A000005, ordered), n = x*y*z (A034836, unordered, A007425, ordered), n = w*x*y*z (A007426, ordered).
Cf. A098198 (Dgf at s=2), A183030 (Dgf at s=3), A183031 (Dgf at s=3).

Programs

  • GAP
    List([1..150],n->Tau(n)); # Muniru A Asiru, Mar 05 2019
    
  • Haskell
    divisors 1 = [1]
    divisors n = (1:filter ((==0) . rem n)
                   [2..n `div` 2]) ++ [n]
    a = length . divisors
    -- James Spahlinger, Oct 07 2012
    
  • Haskell
    a000005 = product . map (+ 1) . a124010_row  -- Reinhard Zumkeller, Jul 12 2013
    
  • Julia
    function tau(n)
        i = 2; num = 1
        while i * i <= n
            if rem(n, i) == 0
                e = 0
                while rem(n, i) == 0
                    e += 1
                    n = div(n, i)
                end
                num *= e + 1
            end
            i += 1
        end
        return n > 1 ? num + num : num
    end
    println([tau(n) for n in 1:104])  # Peter Luschny, Sep 03 2023
  • Magma
    [ NumberOfDivisors(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    with(numtheory): A000005 := tau; [ seq(tau(n), n=1..100) ];
  • Mathematica
    Table[DivisorSigma[0, n], {n, 100}] (* Enrique Pérez Herrero, Aug 27 2009 *)
    CoefficientList[Series[(Log[1 - q] + QPolyGamma[1, q])/(q Log[q]), {q, 0, 100}], q] (* Vladimir Reshetnikov, Apr 23 2013 *)
    a[ n_] := SeriesCoefficient[ (QPolyGamma[ 1, q] + Log[1 - q]) / Log[q], {q, 0, Abs@n}]; (* Michael Somos, Apr 25 2013 *)
    a[ n_] := SeriesCoefficient[ q/(1 - q)^2 QHypergeometricPFQ[ {q, q}, {q^2, q^2}, q, q^2], {q, 0, Abs@n}]; (* Michael Somos, Mar 05 2014 *)
    a[n_] := SeriesCoefficient[q/(1 - q) QHypergeometricPFQ[{q, q}, {q^2}, q, q], {q, 0, Abs@n}] (* Mats Granvik, Apr 15 2015 *)
    With[{M=500},CoefficientList[Series[(2x)/(1-x)-Sum[x^k (1-2x^k)/(1-x^k),{k,M}],{x,0,M}],x]] (* Mamuka Jibladze, Aug 31 2018 *)
  • MuPAD
    numlib::tau (n)$ n=1..90 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if( n==0, 0, numdiv(n))}; /* Michael Somos, Apr 27 2003 */
    
  • PARI
    {a(n) = n=abs(n); if( n<1, 0, direuler( p=2, n, 1 / (1 - X)^2)[n])}; /* Michael Somos, Apr 27 2003 */
    
  • PARI
    {a(n)=polcoeff(sum(m=1, n+1, sumdiv(m, d, (-log(1-x^(m/d) +x*O(x^n) ))^d/d!)), n)} \\ Paul D. Hanna, Aug 21 2014
    
  • Python
    from sympy import divisor_count
    for n in range(1, 20): print(divisor_count(n), end=', ') # Stefano Spezia, Nov 05 2018
    
  • Sage
    [sigma(n, 0) for n in range(1, 105)]  # Zerinvary Lajos, Jun 04 2009
    

Formula

If n is written as 2^z*3^y*5^x*7^w*11^v*... then a(n)=(z+1)*(y+1)*(x+1)*(w+1)*(v+1)*...
a(n) = 2 iff n is prime.
G.f.: Sum_{n >= 1} a(n) x^n = Sum_{k>0} x^k/(1-x^k). This is usually called THE Lambert series (see Knopp, Titchmarsh).
a(n) = A083888(n) + A083889(n) + A083890(n) + A083891(n) + A083892(n) + A083893(n) + A083894(n) + A083895(n) + A083896(n).
a(n) = A083910(n) + A083911(n) + A083912(n) + A083913(n) + A083914(n) + A083915(n) + A083916(n) + A083917(n) + A083918(n) + A083919(n).
Multiplicative with a(p^e) = e+1. - David W. Wilson, Aug 01 2001
a(n) <= 2 sqrt(n) [see Mitrinovich, p. 39, also A046522].
a(n) is odd iff n is a square. - Reinhard Zumkeller, Dec 29 2001
a(n) = Sum_{k=1..n} f(k, n) where f(k, n) = 1 if k divides n, 0 otherwise (Mobius transform of A000012). Equivalently, f(k, n) = (1/k)*Sum_{l=1..k} z(k, l)^n with z(k, l) the k-th roots of unity. - Ralf Stephan, Dec 25 2002
G.f.: Sum_{k>0} ((-1)^(k+1) * x^(k * (k + 1)/2) / ((1 - x^k) * Product_{i=1..k} (1 - x^i))). - Michael Somos, Apr 27 2003
a(n) = n - Sum_{k=1..n} (ceiling(n/k) - floor(n/k)). - Benoit Cloitre, May 11 2003
a(n) = A032741(n) + 1 = A062011(n)/2 = A054519(n) - A054519(n-1) = A006218(n) - A006218(n-1) = 1 + Sum_{k=1..n-1} A051950(k+1). - Ralf Stephan, Mar 26 2004
G.f.: Sum_{k>0} x^(k^2)*(1+x^k)/(1-x^k). Dirichlet g.f.: zeta(s)^2. - Michael Somos, Apr 05 2003
Sequence = M*V where M = A129372 as an infinite lower triangular matrix and V = ruler sequence A001511 as a vector: [1, 2, 1, 3, 1, 2, 1, 4, ...]. - Gary W. Adamson, Apr 15 2007
Sequence = M*V, where M = A115361 is an infinite lower triangular matrix and V = A001227, the number of odd divisors of n, is a vector: [1, 1, 2, 1, 2, 2, 2, ...]. - Gary W. Adamson, Apr 15 2007
Row sums of triangle A051731. - Gary W. Adamson, Nov 02 2007
Sum_{n>0} a(n)/(n^n) = Sum_{n>0, m>0} 1/(n*m). - Gerald McGarvey, Dec 15 2007
Logarithmic g.f.: Sum_{n>=1} a(n)/n * x^n = -log( Product_{n>=1} (1-x^n)^(1/n) ). - Joerg Arndt, May 03 2008
a(n) = Sum_{k=1..n} (floor(n/k) - floor((n-1)/k)). - Enrique Pérez Herrero, Aug 27 2009
a(s) = 2^omega(s), if s > 1 is a squarefree number (A005117) and omega(s) is: A001221. - Enrique Pérez Herrero, Sep 08 2009
a(n) = A048691(n) - A055205(n). - Reinhard Zumkeller, Dec 08 2009
For n > 1, a(n) = 2 + Sum_{k=2..n-1} floor((cos(Pi*n/k))^2). And floor((cos(Pi*n/k))^2) = floor(1/4 * e^(-(2*i*Pi*n)/k) + 1/4 * e^((2*i*Pi*n)/k) + 1/2). - Eric Desbiaux, Mar 09 2010, corrected Apr 16 2011
a(n) = 1 + Sum_{k=1..n} (floor(2^n/(2^k-1)) mod 2) for every n. - Fabio Civolani (civox(AT)tiscali.it), Mar 12 2010
From Vladimir Shevelev, May 22 2010: (Start)
(Sum_{d|n} a(d))^2 = Sum_{d|n} a(d)^3 (J. Liouville).
Sum_{d|n} A008836(d)*a(d)^2 = A008836(n)*Sum_{d|n} a(d). (End)
a(n) = sigma_0(n) = 1 + Sum_{m>=2} Sum_{r>=1} (1/m^(r+1))*Sum_{j=1..m-1} Sum_{k=0..m^(r+1)-1} e^(2*k*Pi*i*(n+(m-j)*m^r)/m^(r+1)). - A. Neves, Oct 04 2010
a(n) = 2*A038548(n) - A010052(n). - Reinhard Zumkeller, Mar 08 2013
Sum_{n>=1} a(n)*q^n = (log(1-q) + psi_q(1)) / log(q), where psi_q(z) is the q-digamma function. - Vladimir Reshetnikov, Apr 23 2013
a(n) = Product_{k = 1..A001221(n)} (A124010(n,k) + 1). - Reinhard Zumkeller, Jul 12 2013
a(n) = Sum_{k=1..n} A238133(k)*A000041(n-k). - Mircea Merca, Feb 18 2013
G.f.: Sum_{k>=1} Sum_{j>=1} x^(j*k). - Mats Granvik, Jun 15 2013
The formula above is obtained by expanding the Lambert series Sum_{k>=1} x^k/(1-x^k). - Joerg Arndt, Mar 12 2014
G.f.: Sum_{n>=1} Sum_{d|n} ( -log(1 - x^(n/d)) )^d / d!. - Paul D. Hanna, Aug 21 2014
2*Pi*a(n) = Sum_{m=1..n} Integral_{x=0..2*Pi} r^(m-n)( cos((m-n)*x)-r^m cos(n*x) )/( 1+r^(2*m)-2r^m cos(m*x) )dx, 0 < r < 1 a free parameter. This formula is obtained as the sum of the residues of the Lambert series Sum_{k>=1} x^k/(1-x^k). - Seiichi Kirikami, Oct 22 2015
a(n) = A091220(A091202(n)) = A106737(A156552(n)). - Antti Karttunen, circa 2004 & Mar 06 2017
a(n) = A034296(n) - A237665(n+1) [Wang, Fokkink, Fokkink]. - George Beck, May 06 2017
G.f.: 2*x/(1-x) - Sum_{k>0} x^k*(1-2*x^k)/(1-x^k). - Mamuka Jibladze, Aug 29 2018
a(n) = Sum_{k=1..n} 1/phi(n / gcd(n, k)). - Daniel Suteu, Nov 05 2018
a(k*n) = a(n)*(f(k,n)+2)/(f(k,n)+1), where f(k,n) is the exponent of the highest power of k dividing n and k is prime. - Gary Detlefs, Feb 08 2019
a(n) = 2*log(p(n))/log(n), n > 1, where p(n)= the product of the factors of n = A007955(n). - Gary Detlefs, Feb 15 2019
a(n) = (1/n) * Sum_{k=1..n} sigma(gcd(n,k)), where sigma(n) = sum of divisors of n. - Orges Leka, May 09 2019
a(n) = A001227(n)*(A007814(n) + 1) = A001227(n)*A001511(n). - Ivan N. Ianakiev, Nov 14 2019
From Richard L. Ollerton, May 11 2021: (Start)
a(n) = A038040(n) / n = (1/n)*Sum_{d|n} phi(d)*sigma(n/d), where phi = A000010 and sigma = A000203.
a(n) = (1/n)*Sum_{k=1..n} phi(gcd(n,k))*sigma(n/gcd(n,k))/phi(n/gcd(n,k)). (End)
From Ridouane Oudra, Nov 12 2021: (Start)
a(n) = Sum_{j=1..n} Sum_{k=1..j} (1/j)*cos(2*k*n*Pi/j);
a(n) = Sum_{j=1..n} Sum_{k=1..j} (1/j)*e^(2*k*n*Pi*i/j), where i^2=-1. (End)

Extensions

Incorrect formula deleted by Ridouane Oudra, Oct 28 2021

A008683 Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0.

Original entry on oeis.org

1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1, -1
Offset: 1

Views

Author

Keywords

Comments

Moebius inversion: f(n) = Sum_{d|n} g(d) for all n <=> g(n) = Sum_{d|n} mu(d)*f(n/d) for all n.
a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3 * 3 and 375 = 3 * 5^3 both have prime signature (3, 1).
A008683 = A140579^(-1) * A140664. - Gary W. Adamson, May 20 2008
Coons & Borwein prove that Sum_{n>=1} mu(n) z^n is transcendental. - Jonathan Vos Post, Jun 11 2008; edited by Charles R Greathouse IV, Sep 06 2017
Equals row sums of triangle A144735 (the square of triangle A054533). - Gary W. Adamson, Sep 20 2008
Conjecture: a(n) is the determinant of Redheffer matrix A143104 where T(n, n) = 0. Verified for the first 50 terms. - Mats Granvik, Jul 25 2008
From Mats Granvik, Dec 06 2008: (Start)
The Editorial Office of the Journal of Number Theory kindly provided (via B. Conrey) the following proof of the conjecture: Let A be A143104 and B be A143104 where T(n, n) = 0.
"Suppose you expand det(B_n) along the bottom row. There is only a 1 in the first position and so the answer is (-1)^n times det(C_{n-1}) say, where C_{n-1} is the (n-1) by (n-1) matrix obtained from B_n by deleting the first column and the last row. Now the determinant of the Redheffer matrix is det(A_n) = M(n) where M(n) is the sum of mu(m) for 1 <= m <= n. Expanding det(A_n) along the bottom row, we see that det(A_n) = (-1)^n * det(C_{n-1}) + M(n-1). So we have det(B_n) = (-1)^n * det(C_{n-1}) = det(A_n) - M(n-1) = M(n) - M(n-1) = mu(n)." (End)
Conjecture: Consider the table A051731 and treat 1 as a divisor. Move the value in the lower right corner vertically to a divisor position in the transpose of the table and you will find that the determinant is the Moebius function. The number of permutation matrices that contribute to the Moebius function appears to be A074206. - Mats Granvik, Dec 08 2008
Convolved with A152902 = A000027, the natural numbers. - Gary W. Adamson, Dec 14 2008
[Pickover, p. 226]: "The probability that a number falls in the -1 mailbox turns out to be 3/Pi^2 - the same probability as for falling in the +1 mailbox". - Gary W. Adamson, Aug 13 2009
Let A = A176890 and B = A * A * ... * A, then the leftmost column in matrix B converges to the Moebius function. - Mats Granvik, Gary W. Adamson, Apr 28 2010 and May 28 2020
Equals row sums of triangle A176918. - Gary W. Adamson, Apr 29 2010
Calculate matrix powers: A175992^0 - A175992^1 + A175992^2 - A175992^3 + A175992^4 - ... Then the Mobius function is found in the first column. Compare this to the binomial series for (1+x)^-1 = 1 - x + x^2 - x^3 + x^4 - ... . - Mats Granvik, Gary W. Adamson, Dec 06 2010
From Richard L. Ollerton, May 08 2021: (Start)
Formulas for the numerous OEIS entries involving the Möbius transform (Dirichlet convolution of a(n) and some sequence h(n)) can be derived using the following (n >= 1):
Sum_{d|n} mu(d)*h(n/d) = Sum_{k=1..n} h(gcd(n,k))*mu(n/gcd(n,k))/phi(n/gcd(n,k)) = Sum_{k=1..n} h(n/gcd(n,k))*mu(gcd(n,k))/phi(n/gcd(n,k)), where phi = A000010.
Use of gcd(n,k)*lcm(n,k) = n*k provides further variations. (End)
Formulas for products corresponding to the sums above are also available for sequences f(n) > 0: Product_{d|n} f(n/d)^mu(d) = Product_{k=1..n} f(gcd(n,k))^(mu(n/gcd(n,k))/phi(n/gcd(n,k))) = Product_{k=1..n} f(n/gcd(n,k))^(mu(gcd(n,k))/phi(n/gcd(n,k))). - Richard L. Ollerton, Nov 08 2021

Examples

			G.f. = x - x^2 - x^3 - x^5 + x^6 - x^7 + x^10 - x^11 - x^13 + x^14 + x^15 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 24.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 161, #16.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 64-65.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 262 and 287.
  • Clifford A. Pickover, "The Math Book, from Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics", Sterling Publishing, 2009, p. 226. - Gary W. Adamson, Aug 13 2009
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis Volume II. Springer_Verlag 1976.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 98-99.

Crossrefs

Variants of a(n) are A178536, A181434, A181435.
Cf. A059956 (Dgf at s=2), A088453 (Dgf at s=3), A215267 (Dgf at s=4), A343308 (Dgf at s=5).

Programs

  • Axiom
    [moebiusMu(n) for n in 1..100]
    
  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a008683 = mu . snd . unzip . factorise where
    mu [] = 1; mu (1:es) = - mu es; mu (_:es) = 0
    -- Reinhard Zumkeller, Dec 13 2015, Oct 09 2013
    
  • Haskell
    a008683 1 = 1
    a008683 n = - sum [a008683 d | d <- [1..(n-1)], n `mod` d == 0]
    -- Harry Richman, Jun 13 2025
    
  • Magma
    [ MoebiusMu(n) : n in [1..100]];
    
  • Maple
    with(numtheory): A008683 := n->mobius(n);
    with(numtheory): [ seq(mobius(n), n=1..100) ];
    # Note that older versions of Maple define mobius(0) to be -1.
    # This is unwise! Moebius(0) is better left undefined.
    with(numtheory):
    mu:= proc(n::posint) option remember; `if`(n=1, 1,
           -add(mu(d), d=divisors(n) minus {n}))
         end:
    seq(mu(n), n=1..100);  # Alois P. Heinz, Aug 13 2008
  • Mathematica
    Array[ MoebiusMu, 100]
    (* Second program: *)
    m = 100; A[_] = 0;
    Do[A[x_] = x - Sum[A[x^k], {k, 2, m}] + O[x]^m // Normal, {m}];
    CoefficientList[A[x]/x, x] (* Jean-François Alcover, Oct 20 2019, after Ilya Gutkovskiy *)
  • Maxima
    A008683(n):=moebius(n)$ makelist(A008683(n),n,1,30); /* Martin Ettl, Oct 24 2012 */
    
  • PARI
    a=n->if(n<1,0,moebius(n));
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, 1 - X)[n])};
    
  • PARI
    list(n)=my(v=vector(n,i,1)); forprime(p=2, sqrtint(n), forstep(i=p, n, p, v[i]*=-1); forstep(i=p^2, n, p^2, v[i]=0)); forprime(p=sqrtint(n)+1, n, forstep(i=p, n, p, v[i]*=-1)); v \\ Charles R Greathouse IV, Apr 27 2012
    
  • Python
    from sympy import mobius
    print([mobius(i) for i in range(1, 101)])  # Indranil Ghosh, Mar 18 2017
  • Sage
    @cached_function
    def mu(n):
        if n < 2: return n
        return -sum(mu(d) for d in divisors(n)[:-1])
    # Changing the sign of the sum gives the number of ordered factorizations of n A074206.
    print([mu(n) for n in (1..96)])  # Peter Luschny, Dec 26 2016
    

Formula

Sum_{d|n} mu(d) = 1 if n = 1 else 0.
Dirichlet generating function: Sum_{n >= 1} mu(n)/n^s = 1/zeta(s). Also Sum_{n >= 1} mu(n)*x^n/(1-x^n) = x.
In particular, Sum_{n > 0} mu(n)/n = 0. - Franklin T. Adams-Watters, Jun 20 2014
phi(n) = Sum_{d|n} mu(d)*n/d.
a(n) = A091219(A091202(n)).
Multiplicative with a(p^e) = -1 if e = 1; 0 if e > 1. - David W. Wilson, Aug 01 2001
abs(a(n)) = Sum_{d|n} 2^A001221(d)*a(n/d). - Benoit Cloitre, Apr 05 2002
Sum_{d|n} (-1)^(n/d)*mobius(d) = 0 for n > 2. - Emeric Deutsch, Jan 28 2005
a(n) = (-1)^omega(n) * 0^(bigomega(n) - omega(n)) for n > 0, where bigomega(n) and omega(n) are the numbers of prime factors of n with and without repetition (A001222, A001221, A046660). - Reinhard Zumkeller, Apr 05 2003
Dirichlet generating function for the absolute value: zeta(s)/zeta(2s). - Franklin T. Adams-Watters, Sep 11 2005
mu(n) = A129360(n) * (1, -1, 0, 0, 0, ...). - Gary W. Adamson, Apr 17 2007
mu(n) = -Sum_{d < n, d|n} mu(d) if n > 1 and mu(1) = 1. - Alois P. Heinz, Aug 13 2008
a(n) = A174725(n) - A174726(n). - Mats Granvik, Mar 28 2010
a(n) = first column in the matrix inverse of a triangular table with the definition: T(1, 1) = 1, n > 1: T(n, 1) is any number or sequence, k = 2: T(n, 2) = T(n, k-1) - T(n-1, k), k > 2 and n >= k: T(n,k) = (Sum_{i = 1..k-1} T(n-i, k-1)) - (Sum_{i = 1..k-1} T(n-i, k)). - Mats Granvik, Jun 12 2010
Product_{n >= 1} (1-x^n)^(-a(n)/n) = exp(x) (product form of the exponential function). - Joerg Arndt, May 13 2011
a(n) = Sum_{k=1..n, gcd(k,n)=1} exp(2*Pi*i*k/n), the sum over the primitive n-th roots of unity. See the Apostol reference, p. 48, Exercise 14 (b). - Wolfdieter Lang, Jun 13 2011
mu(n) = Sum_{k=1..n} A191898(n,k)*exp(-i*2*Pi*k/n)/n. (conjecture). - Mats Granvik, Nov 20 2011
Sum_{k=1..n} a(k)*floor(n/k) = 1 for n >= 1. - Peter Luschny, Feb 10 2012
a(n) = floor(omega(n)/bigomega(n))*(-1)^omega(n) = floor(A001221(n)/A001222(n))*(-1)^A001221(n). - Enrique Pérez Herrero, Apr 27 2012
Multiplicative with a(p^e) = binomial(1, e) * (-1)^e. - Enrique Pérez Herrero, Jan 19 2013
G.f. A(x) satisfies: x^2/A(x) = Sum_{n>=1} A( x^(2*n)/A(x)^n ). - Paul D. Hanna, Apr 19 2016
a(n) = -A008966(n)*A008836(n)/(-1)^A005361(n) = -floor(rad(n)/n)Lambda(n)/(-1)^tau(n/rad(n)). - Anthony Browne, May 17 2016
a(n) = Kronecker delta of A001221(n) and A001222(n) (which is A008966) multiplied by A008836(n). - Eric Desbiaux, Mar 15 2017
a(n) = A132971(A156552(n)). - Antti Karttunen, May 30 2017
Conjecture: a(n) = Sum_{k>=0} (-1)^(k-1)*binomial(A001222(n)-1, k)*binomial(A001221(n)-1+k, k), for n > 1. Verified for the first 100000 terms. - Mats Granvik, Sep 08 2018
From Peter Bala, Mar 15 2019: (Start)
Sum_{n >= 1} mu(n)*x^n/(1 + x^n) = x - 2*x^2. See, for example, Pólya and Szegő, Part V111, Chap. 1, No. 71.
Sum_{n >= 1} (-1)^(n+1)*mu(n)*x^n/(1 - x^n) = x + 2*(x^2 + x^4 + x^8 + x^16 + ...).
Sum_{n >= 1} (-1)^(n+1)*mu(n)*x^n/(1 + x^n) = x - 2*(x^4 + x^8 + x^16 + x^32 + ...).
Sum_{n >= 1} |mu(n)|*x^n/(1 - x^n) = Sum_{n >= 1} (2^w(n))*x^n, where w(n) is the number of different prime factors of n (Hardy and Wright, Chapter XVI, Theorem 264).
Sum_{n odd} |mu(n)|*x^n/(1 + x^(2*n)) = Sum_{n in S_1} (2^w_1(n))*x^n, where S_1 = {1, 5, 13, 17, 25, 29, ...} is the multiplicative semigroup of positive integers generated by 1 and the primes p = 1 (mod 4), and w_1(n) is the number of different prime factors p = 1 (mod 4) of n.
Sum_{n odd} (-1)^((n-1)/2)*mu(n)*x^n/(1 - x^(2*n)) = Sum_{n in S_3} (2^w_3(n))*x^n, where S_3 = {1, 3, 7, 9, 11, 19, 21, ...} is the multiplicative semigroup of positive integers generated by 1 and the primes p = 3 (mod 4), and where w_3(n) is the number of different prime factors p = 3 (mod 4) of n. (End)
G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, May 11 2019
a(n) = sign(A023900(n)) * [A007947(n) = n] where [] is the Iverson bracket. - I. V. Serov, May 15 2019
a(n) = Sum_{k = 1..n} gcd(k, n)*a(gcd(k, n)) = Sum_{d divides n} a(d)*d*phi(n/d). - Peter Bala, Jan 16 2024

A008578 Prime numbers at the beginning of the 20th century (today 1 is no longer regarded as a prime).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Keywords

Comments

1 together with the primes; also called the noncomposite numbers.
Also largest sequence of nonnegative integers with the property that the product of 2 or more elements with different indices is never a square. - Ulrich Schimke (ulrschimke(AT)aol.com), Dec 12 2001 [Comment corrected by Farideh Firoozbakht, Aug 03 2014]
Numbers k whose largest divisor <= sqrt(k) equals 1. (See also A161344, A161345, A161424.) - Omar E. Pol, Jul 05 2009
Numbers k such that d(k) <= 2. - Juri-Stepan Gerasimov, Oct 17 2009
Also first column of array in A163280. Also first row of array in A163990. - Omar E. Pol, Oct 24 2009
Possible values of A136548(m) in increasing order, where A136548(m) = the largest numbers h such that A000203(h) <= k (k = 1,2,3,...), where A000203(h) = sum of divisors of h. - Jaroslav Krizek, Mar 01 2010
Where record values of A022404 occur: A086332(n)=A022404(a(n)). - Reinhard Zumkeller, Jun 21 2010
Positive integers that have no divisors other than 1 and itself (the old definition of prime numbers). - Omar E. Pol, Aug 10 2012
Conjecture: the sequence contains exactly those k such that sigma(k) > k*BigOmega(k). - Irina Gerasimova, Jun 08 2013
Note on the Gerasimova conjecture: all terms in the sequence obviously satisfy the inequality, because sigma(p) = 1+p and BigOmega(p) = 1 for primes p, so 1+p > p*1. For composites, the (opposite) inequality is heuristically correct at least up to k <= 4400000. The general proof requires to show that BigOmega(k) is an upper limit of the abundancy sigma(k)/k for composite k. This proof is easy for semiprimes k=p1*p2 in general, where sigma(k)=1+p1+p2+p1*p2 and BigOmega(k)=2 and p1, p2 <= 2. - R. J. Mathar, Jun 12 2013
Numbers k such that phi(k) + sigma(k) = 2k. - Farideh Firoozbakht, Aug 03 2014
isA008578(n) <=> k is prime to n for all k in {1,2,...,n-1}. - Peter Luschny, Jun 05 2017
In 1751 Leonhard Euler wrote: "Having so established this sign S to indicate the sum of the divisors of the number in front of which it is placed, it is clear that, if p indicates a prime number, the value of Sp will be 1 + p, except for the case where p = 1, because then we have S1 = 1, and not S1 = 1 + 1. From this we see that we must exclude unity from the sequence of prime numbers, so that unity, being the start of whole numbers, it is neither prime nor composite." - Omar E. Pol, Oct 12 2021
a(1) = 1; for n >= 2, a(n) is the least unused number that is coprime to all previous terms. - Jianing Song, May 28 2022
A number p is preprime if p = a*b ==> a = 1 or b = 1. This sequence lists the preprimes in the commutative monoid IN \ {0}. - Peter Luschny, Aug 26 2022

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 84 at pp. 214-217.
  • G. Chrystal, Algebra: An Elementary Textbook. Chelsea Publishing Company, 7th edition, (1964), chap. III.7, p. 38.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 11.
  • H. D. Huskey, Derrick Henry Lehmer [1905-1991]. IEEE Ann. Hist. Comput. 17 (1995), no. 2, 64-68. Math. Rev. 96b:01035
  • D. H. Lehmer, The sieve problem for all-purpose computers. Math. Tables and Other Aids to Computation, Math. Tables and Other Aids to Computation, 7, (1953). 6-14. Math. Rev. 14:691e
  • D. N. Lehmer, "List of Prime Numbers from 1 to 10,006,721", Carnegie Institute, Washington, D.C. 1909.
  • R. F. Lukes, C. D. Patterson and H. C. Williams, Numerical sieving devices: their history and some applications. Nieuw Arch. Wisk. (4) 13 (1995), no. 1, 113-139. Math. Rev. 96m:11082
  • H. C. Williams and J. O. Shallit, Factoring integers before computers. Mathematics of Computation 1943-1993: a half-century of computational mathematics (Vancouver, BC, 1993), 481-531, Proc. Sympos. Appl. Math., 48, AMS, Providence, RI, 1994. Math. Rev. 95m:11143

Crossrefs

The main entry for this sequence is A000040.
The complement of A002808.
Cf. A000732 (boustrophedon transform).
Cf. A023626 (self-convolution).

Programs

  • GAP
    A008578:=Concatenation([1],Filtered([1..10^5],IsPrime)); # Muniru A Asiru, Sep 07 2017
  • Haskell
    a008578 n = a008578_list !! (n-1)
    a008578_list = 1 : a000040_list
    -- Reinhard Zumkeller, Nov 09 2011
    
  • Magma
    [1] cat [n: n in PrimesUpTo(271)];  // Bruno Berselli, Mar 05 2011
    
  • Maple
    A008578 := n->if n=1 then 1 else ithprime(n-1); fi :
  • Mathematica
    Join[ {1}, Table[ Prime[n], {n, 1, 60} ] ]
    NestList[ NextPrime, 1, 57] (* Robert G. Wilson v, Jul 21 2015 *)
    oldPrimeQ[n_] := AllTrue[Range[n-1], CoprimeQ[#, n]&];
    Select[Range[271], oldPrimeQ] (* Jean-François Alcover, Jun 07 2017, after Peter Luschny *)
  • PARI
    is(n)=isprime(n)||n==1
    
  • Sage
    isA008578 = lambda n: all(gcd(k, n) == 1 for k in (1..n-1))
    print([n for n in (1..271) if isA008578(n)]) # Peter Luschny, Jun 07 2017
    

Formula

a(n) = A000040(n-1).
m is in the sequence iff sigma(m) + phi(m) = A065387(m) = 2m. - Farideh Firoozbakht, Jan 27 2005
a(n) = A158611(n+1) for n >= 1. - Jaroslav Krizek, Jun 19 2009
In the following formulas (based on emails from Jaroslav Krizek and R. J. Mathar), the star denotes a Dirichlet convolution between two sequences, and "This" is A008578.
This = A030014 * A008683. (Dirichlet convolution using offset 1 with A030014)
This = A030013 * A000012. (Dirichlet convolution using offset 1 with A030013)
This = A034773 * A007427. (Dirichlet convolution)
This = A034760 * A023900. (Dirichlet convolution)
This = A034762 * A046692. (Dirichlet convolution)
This * A000012 = A030014. (Dirichlet convolution using offset 1 with A030014)
This * A008683 = A030013. (Dirichlet convolution using offset 1 with A030013)
This * A000005 = A034773. (Dirichlet convolution)
This * A000010 = A034760. (Dirichlet convolution)
This * A000203 = A034762. (Dirichlet convolution)
A002033(a(n))=1. - Juri-Stepan Gerasimov, Sep 27 2009
a(n) = A181363((2*n-1)*2^k), k >= 0. - Reinhard Zumkeller, Oct 16 2010
a(n) = A001747(n)/2. - Omar E. Pol, Jan 30 2012
A060448(a(n)) = 1. - Reinhard Zumkeller, Apr 05 2012
A086971(a(n)) = 0. - Reinhard Zumkeller, Dec 14 2012
Sum_{n>=1} x^a(n) = (Sum_{n>=1} (A002815(n)*x^n))*(1-x)^2. - L. Edson Jeffery, Nov 25 2013

A001158 sigma_3(n): sum of cubes of divisors of n.

Original entry on oeis.org

1, 9, 28, 73, 126, 252, 344, 585, 757, 1134, 1332, 2044, 2198, 3096, 3528, 4681, 4914, 6813, 6860, 9198, 9632, 11988, 12168, 16380, 15751, 19782, 20440, 25112, 24390, 31752, 29792, 37449, 37296, 44226, 43344, 55261, 50654, 61740, 61544, 73710, 68922, 86688
Offset: 1

Views

Author

Keywords

Comments

If the canonical factorization of n into prime powers is the product of p^e(p) then sigma_k(n) = Product_p ((p^((e(p)+1)*k))-1)/(p^k-1).
Sum_{d|n} 1/d^k is equal to sigma_k(n)/n^k. So sequences A017665-A017712 also give the numerators and denominators of sigma_k(n)/n^k for k = 1..24. The power sums sigma_k(n) are in sequences A000203 (k=1), A001157-A001160 (k=2,3,4,5), A013954-A013972 for k = 6..24. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 05 2001
Also the eigenvalues of the Hecke operator T_n for the entire modular normalized Eisenstein form E_4(z) (see A004009): T_n E_4 = a(n) E_4, n >= 1. For the Hecke operator T_n and eigenforms see, e.g., the Koecher-Krieg reference, p. 207, eq. (5) and p. 211, section 4, or the Apostol reference p. 120, eq. (13) and pp. 129 - 133. - Wolfdieter Lang, Jan 28 2016

Examples

			G.f. = x + 9*x^2 + 28*x^3 + 73*x^4 + 126*x^5 + 252*x^6 + 344*x^7 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math.Series 55, Tenth Printing, 1972, p. 827.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
  • T. M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Second edition, Springer, 1990, pp. 120, 129 - 133.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 166.
  • Max Koecher and Aloys Krieg, Elliptische Funktionen und Modulformen, 2. Auflage, Springer, 2007, pp. 207, 211.
  • 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).
  • Zagier, Don. "Elliptic modular forms and their applications." The 1-2-3 of modular forms. Springer Berlin Heidelberg, 2008. 1-103. See p. 17, G_4(z).

Crossrefs

Cf. A004009, A064603 (partial sums).

Programs

  • Haskell
    a001158 n = product $ zipWith (\p e -> (p^(3*e + 3) - 1) `div` (p^3 - 1))
                          (a027748_row n) (a124010_row n)
    -- Reinhard Zumkeller, Jun 30 2013
    
  • Magma
    [DivisorSigma(3,n): n in [1..40]]; // Bruno Berselli, Apr 10 2013
    
  • Maple
    seq(numtheory:-sigma[3](n),n=1..100); # Robert Israel, Feb 05 2016
  • Mathematica
    Table[DivisorSigma[3,n],{n,100}] (* corrected by T. D. Noe, Mar 22 2009 *)
  • Maxima
    makelist(divsum(n,3),n,1,100); /* Emanuele Munarini, Mar 26 2011 */
    
  • PARI
    N=99; q='q+O('q^N);
    Vec(sum(n=1,N,n^3*q^n/(1-q^n))) /* Joerg Arndt, Feb 04 2011 */
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, d^3))}; /* Michael Somos, Jan 07 2017 */
    
  • Python
    from sympy import divisor_sigma
    def a(n): return divisor_sigma(n, 3)
    print([a(n) for n in range(1, 43)]) # Michael S. Branicky, Jan 09 2021
  • Sage
    [sigma(n, 3) for n in range(1, 40)]  # Zerinvary Lajos, Jun 04 2009
    

Formula

Multiplicative with a(p^e) = (p^(3e+3)-1)/(p^3-1). - David W. Wilson, Aug 01 2001
Dirichlet g.f. zeta(s)*zeta(s-3). - R. J. Mathar, Mar 04 2011
G.f.: sum(k>=1, k^3*x^k/(1-x^k)). - Benoit Cloitre, Apr 21 2003
Equals A051731 * [1, 8, 27, 64, 125, ...] = A127093 * [1, 4, 9, 16, 25, ...]. - Gary W. Adamson, Nov 02 2007
L.g.f.: -log(Product_{j>=1} (1-x^j)^(j^2)) = (1/1)*z^1 + (9/2)*z^2 + (28/3)*z^3 + (73/4)*z^4 + ... + (a(n)/n)*z^n + ... - Joerg Arndt, Feb 04 2011
a(n) = Sum{d|n} tau_{-2}^d*J_3(n/d), where tau_{-2} is A007427 and J_3 is A059376. - Enrique Pérez Herrero, Jan 19 2013
a(n) = A004009(n)/240. - Artur Jasinski, Sep 06 2016. See, e.g., Hardy, p. 166, (10.5.6), with Q = E_4, and with present offset 0. - Wolfdieter Lang, Jan 31 2017
8*a(n) = sum of cubes of even divisors of 2*n. - Wolfdieter Lang, Jan 07 2017
G.f.: Sum_{n >= 1} x^n*(1 + 4*x^n + x^(2*n))/(1 - x^n)^4. - Peter Bala, Jan 11 2021
Faster converging g.f.: Sum_{n >= 1} q^(n^2)*( n^3 + ((n + 1)^3 - 3*n^3)*q^n + (4 - 6*n^2)*q^(2*n) + (3*n^3 - (n - 1)^3)*q^(3*n) - n^3*q^(4*n) )/(1 - q^n)^4 - apply the operator x*d/dx three times to equation 5 in Arndt and then set x = 1. - Peter Bala, Jan 21 2021
a(n) = Sum_{1 <= i, j, k <= n} tau(gcd(i, j, k, n)) = Sum_{d divides n} tau(d)* J_3(n/d), where the divisor function tau(n) = A000005(n) and the Jordan totient function J_3(n) = A059376(n). - Peter Bala, Jan 22 2024

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

A063524 Characteristic function of 1.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Labos Elemer, Jul 30 2001

Keywords

Comments

The identity function for Dirichlet multiplication (see Apostol).
Sum of the Moebius function mu(d) of the divisors d of n. - Robert G. Wilson v, Sep 30 2006
-a(n) is the Hankel transform of A000045(n), n >= 0 (Fibonacci numbers). See A055879 for the definition of Hankel transform. - Wolfdieter Lang, Jan 23 2007
a(A000012(n)) = 1; a(A087156(n)) = 0. - Reinhard Zumkeller, Oct 11 2008
a(n) for n >= 1 is the Dirichlet convolution of following functions b(n), c(n), a(n) = Sum_{d|n} b(d)*c(n/d): a(n) = A008683(n) * A000012(n), a(n) = A007427(n) * A000005(n), a(n) = A007428(n) * A007425(n). - Jaroslav Krizek, Mar 03 2009
From Christopher Hunt Gribble, Jul 11 2013: (Start)
a(n) for 1 <= n <= 4 and conjectured for n > 4 is the number of Hamiltonian circuits in a 2n X 2n square lattice of nodes, reduced for symmetry, where the orbits under the symmetry group of the square, D4, have 1 element: When n=1, there is only 1 Hamiltonian circuit in a 2 X 2 square lattice, as illustrated below. The circuit is the same when rotated and/or reflected and so has only 1 orbital element under the symmetry group of the square.
o--o
| |
o--o (End)
Convolution property: For any sequence b(n), the sequence c(n)=b(n)*a(n) has the following values: c(1)=0, c(n+1)=b(n) for all n > 1. In other words, the sequence b(n) is shifted 1 step to the right. - David Neil McGrath, Nov 10 2014

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 30.

Crossrefs

Programs

Formula

From Philippe Deléham, Nov 25 2008: (Start)
G.f.: x.
E.g.f.: x. (End)
a(n) = mu(n^2). - Enrique Pérez Herrero, Sep 04 2009
a(n) = floor(n/A000203(n)) for n > 0. - Enrique Pérez Herrero, Nov 11 2009
a(n) = (1-(-1)^(2^abs(n-1)))/2 = (1-(-1)^(2^((n-1)^2)))/2. - Luce ETIENNE, Jun 05 2015
a(n) = n*(A057427(n) - A057427(n-1)) = A000007(abs(n-1)). - Chayim Lowen, Aug 01 2015
a(n) = A010051(p*n) for any prime p (where A010051(0)=0). - Chayim Lowen, Aug 05 2015
From Antti Karttunen, Jun 04 2022: (Start)
For n >= 1:
a(n) = Sum_{d|n} A000010(n/d) * A023900(d), and similarly for any pair of sequences that are Dirichlet inverses of each other, like for example A000027 & A055615 and those mentioned in Krizek's Mar 03 2009 comment above.
a(n) = [A101296(n) == 1], where [ ] is the Iverson bracket.
Fully multiplicative with a(p^e) = 0. (End)

A046099 Numbers that are not cubefree. Numbers divisible by a cube greater than 1. Complement of A004709.

Original entry on oeis.org

8, 16, 24, 27, 32, 40, 48, 54, 56, 64, 72, 80, 81, 88, 96, 104, 108, 112, 120, 125, 128, 135, 136, 144, 152, 160, 162, 168, 176, 184, 189, 192, 200, 208, 216, 224, 232, 240, 243, 248, 250, 256, 264, 270, 272, 280, 288, 296, 297, 304, 312, 320, 324, 328, 336
Offset: 1

Views

Author

Keywords

Comments

Also called cubeful numbers, but this term is ambiguous and is best avoided.
Numbers n such that A007427(n) = sum(d|n,mu(d)*mu(n/d)) == 0. - Benoit Cloitre, Apr 17 2002
The convention in the OEIS is that squareful, cubeful, biquadrateful (A046101), ... mean the same as "not squarefree" etc., while 2- or square-full, 3- or cube-full (A036966), 4-full (A036967) are used for Golomb's notion of powerful numbers (A001694, see references there), when each prime factor occurs to a power > 1. - M. F. Hasler, Feb 12 2008. Added by N. J. A. Sloane, Apr 25 2023: This suggestion has not been a success. It is hopeless to try to make a distinction between "cubeful" and "cubefull". To avoid ambiguity, do not use either term, but instead say exactly what you mean.
Also solutions to equation tau_{-2}(n)=0, where tau_{-2} is A007427. - Enrique Pérez Herrero, Jan 19 2013
The asymptotic density of this sequence is 1 - 1/zeta(3) = 0.168092... - Amiram Eldar, Jul 09 2020

Crossrefs

Complement of A004709.
Subsequences: A000578 and A030078.

Programs

  • Haskell
    a046099 n = a046099_list !! (n-1)
    a046099_list = filter ((== 1) . a212793) [1..]
    -- Reinhard Zumkeller, May 27 2012
    
  • Maple
    isA046099 := proc(n)
        local p;
        for p in ifactors(n)[2] do
            if op(2,p) >= 3 then
                return true;
            end if;
        end do:
        false ;
    end proc:
    for n from 1 do
        if isA046099(n) then
            printf("%d\n",n) ;
        end if;
    end do: # R. J. Mathar, Dec 08 2015
  • Mathematica
    lst={};Do[a=0;Do[If[FactorInteger[m][[n, 2]]>2, a=1], {n, Length[FactorInteger[m]]}];If[a==1, AppendTo[lst, m]], {m, 10^3}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 15 2008 *)
  • PARI
    is(n)=n>7 && vecmax(factor(n)[,2])>2 \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from sympy.ntheory.factor_ import core
    def ok(n): return core(n, 3) != n
    print(list(filter(ok, range(1, 337)))) # Michael S. Branicky, Aug 16 2021
    
  • Python
    from sympy import mobius, integer_nthroot
    def A046099(n):
        def f(x): return n+sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 05 2024

Formula

A212793(a(n)) = 0. - Reinhard Zumkeller, May 27 2012
Sum_{n>=1} 1/a(n)^s = (zeta(s)*(zeta(3*s)-1))/zeta(3*s). - Amiram Eldar, Dec 27 2022

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Aug 15 2008
Edited by N. J. A. Sloane, Jul 27 2009
Showing 1-10 of 66 results. Next