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.

A038040 a(n) = n*d(n), where d(n) = number of divisors of n (A000005).

Original entry on oeis.org

1, 4, 6, 12, 10, 24, 14, 32, 27, 40, 22, 72, 26, 56, 60, 80, 34, 108, 38, 120, 84, 88, 46, 192, 75, 104, 108, 168, 58, 240, 62, 192, 132, 136, 140, 324, 74, 152, 156, 320, 82, 336, 86, 264, 270, 184, 94, 480, 147, 300, 204, 312, 106, 432, 220, 448, 228, 232, 118
Offset: 1

Views

Author

Keywords

Comments

Dirichlet convolution of sigma(n) (A000203) with phi(n) (A000010). - Michael Somos, Jun 08 2000
Dirichlet convolution of f(n)=n with itself. See the Apostol reference for Dirichlet convolutions. - Wolfdieter Lang, Sep 09 2008
Sum of all parts of all partitions of n into equal parts. - Omar E. Pol, Jan 18 2013

Examples

			For n = 6 the partitions of 6 into equal parts are [6], [3, 3], [2, 2, 2], [1, 1, 1, 1, 1, 1]. The sum of all parts is 6 + 3 + 3 + 2 + 2 + 2 + 1 + 1 + 1 + 1 + 1 + 1 = 24 equalling 6 times the number of divisors of 6, so a(6) = 24. - _Omar E. Pol_, May 08 2021
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, pp. 29 ff.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 162.

Crossrefs

Cf. A038044, A143127 (partial sums), A328722 (Dirichlet inverse).
Column 1 of A329323.

Programs

  • Haskell
    a038040 n = a000005 n * n  -- Reinhard Zumkeller, Jan 21 2014
    
  • Maple
    with(numtheory): A038040 := n->tau(n)*n;
  • Mathematica
    a[n_] := DivisorSigma[0, n]*n; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Sep 03 2012 *)
  • MuPAD
    n*numlib::tau (n)$ n=1..90 // Zerinvary Lajos, May 13 2008
    
  • PARI
    a(n)=if(n<1,0,direuler(p=2,n,1/(1-p*X)^2)[n])
    
  • PARI
    a(n)=if(n<1,0,polcoeff(sum(k=1,n,k*x^k/(x^k-1)^2,x*O(x^n)),n)) /* Michael Somos, Jan 29 2005 */
    
  • PARI
    a(n) = n*numdiv(n); \\ Michel Marcus, Oct 24 2020
    
  • Python
    from sympy import divisor_count as d
    def a(n): return n*d(n)
    print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Mar 15 2022
    
  • SageMath
    [n*sigma(n,0) for n in range(1, 60)] # Stefano Spezia, Jul 20 2025

Formula

Dirichlet g.f.: zeta(s-1)^2.
G.f.: Sum_{n>=1} n*x^n/(1-x^n)^2. - Vladeta Jovovic, Dec 30 2001
Sum_{k=1..n} sigma(gcd(n, k)). Multiplicative with a(p^e) = (e+1)*p^e. - Vladeta Jovovic, Oct 30 2001
Equals A127648 * A127093 * the harmonic series, [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, May 10 2007
Equals row sums of triangle A127528. - Gary W. Adamson, May 21 2007
a(n) = n*A000005(n) = A066186(n) - n*(A000041(n) - A000005(n)) = A066186(n) - n*A144300(n). - Omar E. Pol, Jan 18 2013
a(n) = A000203(n) * A240471(n) + A106315(n). - Reinhard Zumkeller, Apr 06 2014
L.g.f.: Sum_{k>=1} x^k/(1 - x^k) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 13 2017
a(n) = Sum_{d|n} A018804(d). - Amiram Eldar, Jun 23 2020
a(n) = Sum_{d|n} phi(d)*sigma(n/d). - Ridouane Oudra, Jan 21 2021
G.f.: Sum_{n >= 1} q^(n^2)*(n^2 + 2*n*q^n - n^2*q^(2*n))/(1 - q^n)^2. - Peter Bala, Jan 22 2021
a(n) = Sum_{k=1..n} sigma(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 07 2021
Define f(x) = #{n <= x: a(n) <= x}. Gabdullin & Iudelevich show that f(x) ~ x/sqrt(log x). That is, there are 0 < A < B such that Ax/sqrt(log x) < f(x) < Bx/sqrt(log x). - Charles R Greathouse IV, Mar 15 2022
Sum_{k=1..n} a(k) ~ n^2*log(n)/2 + (gamma - 1/4)*n^2, where gamma is Euler's constant (A001620). - Amiram Eldar, Oct 25 2022
Mobius transform of A060640. - R. J. Mathar, Feb 07 2023