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 40 results. Next

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

A006171 Number of factorization patterns of polynomials of degree n over integers.

Original entry on oeis.org

1, 1, 3, 5, 11, 17, 34, 52, 94, 145, 244, 370, 603, 899, 1410, 2087, 3186, 4650, 6959, 10040, 14750, 21077, 30479, 43120, 61574, 86308, 121785, 169336, 236475, 326201, 451402, 618135, 848209, 1153733, 1571063, 2123325, 2871419, 3857569, 5182999, 6924303
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n where there are unlimited distinguishable but unlabeled objects of each size. E.g., in splitting 2 into two parts of size 1, we distinguish whether the same object is used for each part. Also number of factorization patterns over rationals, or many other UFDs (but not over real or complex numbers). - Franklin T. Adams-Watters, Jun 19 2006
Equals the "aerate and convolve" convergent of A000041: (1, 1, 2, 3, 5, 7, 11, ...) * (1, 0, 1, 0, 2, 0, 3, 0, 5, ...) * (1, 0, 0, 1, 0, 0, 2, 0, 0, 3, ...). - Gary W. Adamson, Jun 16 2009
Also equals the number of distinct (up to unitary similarity) unital *-subalgebras of the n X n complex matrices. A unital *-subalgebra is a subspace that is closed under multiplication and the conjugate transpose, and which contains the identity matrix (see A215905 and A215925). - Nathaniel Johnston, Aug 27 2012
Also equals the number of partitions having parts consisting of runs of equal parts. - Gregory L. Simay, May 25 2017
Also equals the number of generalized partitions of n when there are d(a) different types of a, (a = 1,2,3,...), where d(n) is the number of divisors of n. a(3)=5 because there are 5 partitions of 3 with "d(a) copies of a", namely (3_1), (3_2), (2_1, 1_1), (2_2, 1_1), (1_1, 1_1, 1_1). - Augustine O. Munagi, Jun 13 2022

Examples

			For n=3 we have 3 = (3*1) = (1*3) = (2*1) + (1*1) = (1*2) + (1*1) = (1*1) + (1*1) + (1*1) so a(3)=5.
For n=4 we have the following 11 partitions, with the additive runs indicated by "[]": [4], [3]+[1], [2+2], [2]+[2], [2]+[1+1], [2]+[1]+[1], [1+1+1+1], [1+1+1]+[1], [1+1]+[1+1], [1+1]+[1]+[1], [1]+[1]+[1]+[1]. - _Gregory L. Simay_, May 25 2017
		

References

  • R. A. Hultquist, G. L. Mullen and H. Niederreiter, Association schemes and derived PBIB designs of prime power order, Ars. Combin., 25 (1988), 65-82.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:=etr(tau): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
  • Mathematica
    max = 50; gf[x_] := Product[(1 - x^k)^-DivisorSigma[0, k], {k, 1, max}]; CoefficientList[ Series[gf[x], {x, 0, max}], x] (* Jean-François Alcover, Nov 23 2011 *)
    nmax = 50; s = 1 - x; Do[s *= Sum[Binomial[DivisorSigma[0, k], j]*(-1)^j*x^(j*k), {j, 0, nmax/k}]; s = Expand[s]; s = Take[s, Min[nmax + 1, Exponent[s, x] + 1, Length[s]]];, {k, 2, nmax}]; CoefficientList[Series[1/s, {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2018, the fastest *)
    nmax = 50; CoefficientList[Series[Product[Sum[PartitionsP[k]*x^(j*k), {k, 0, nmax/j}], {j, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Dec 26 2020 *)
  • PARI
    {a(n) = if(n<0, 0, polcoeff( 1 / prod(k=1, n, (1 - x^k + x * O(x^n))^numdiv(k)), n))}; /* Michael Somos, Apr 01 2003 */
    
  • PARI
    N=66; x='x+O('x^N); gf=1/prod(j=1,N, eta(x^j)); Vec(gf) \\ Joerg Arndt, May 03 2008
    
  • PARI
    {a(n)=if(n==0,1,polcoeff(exp(sum(m=1,n,sigma(m)*x^m/(1-x^m+x*O(x^n))/m)),n))} /* Paul D. Hanna, Mar 28 2009 */
    
  • PARI
    {A060640(n)=sumdiv(n, d, d*sigma(n/d))}
    {a(n)=polcoeff(exp(sum(m=1,n+1,A060640(m)*x^m/m)+x*O(x^n)),n)} /* Paul D. Hanna, Oct 19 2011 */

Formula

From Vladeta Jovovic, Apr 21 2001: (Start)
Euler transform of tau(n), tau(n) = the number of divisors of n, cf. A000005.
G.f.: Product_{k>=1} (1 - x^k)^(-tau(k)).
a(n) = 1/n*Sum_{k=1..n} a(n-k)*b(k), n>1, a(0)=1, b(k) = Sum_{d|k} d*tau(d), cf. A060640. (End)
a(n) = Sum_{ partition of n} product p(k(i)), where p(n) is the partition function A000041. E.g., for the partition [4,2^3,1^4], the product is p(1)*p(3)*p(4) = 1*3*5 = 15. - Franklin T. Adams-Watters, Jun 19 2006
G.f.: A(x) = exp( Sum_{n>=1} sigma(n)*x^n/(1-x^n)/n ). - Paul D. Hanna, Mar 28 2009
From Paul D. Hanna, Oct 19 2011: (Start)
Logarithmic derivative yields A060640.
G.f.: A(x) = exp( Sum_{n>=1} A060640(n)*x^n/n ), where A060640(n) = Sum_{d|n} d*sigma(n/d). (End)
G.f.: 1/Product_{n>=1} E(q^n) where E(q) = Product_{n>=1} (1-q^n). - Joerg Arndt, Feb 27 2014
log(a(n)) ~ Pi * sqrt(n*log(n)/3) [Brigham, 1950]. - Vaclav Kotesovec, Jan 04 2017
a(n) ~ exp(Pi*sqrt(n/(3*log(n))) * (log(n) - log(log(n))/2 + gamma + 6*Zeta'(2)/Pi^2 + log(2/Pi) + log(3)/2)) * Pi^(1/4) * (log(n))^(1/8) / (2^(3/4) * 3^(1/8) * n^(5/8)), where gamma is the Euler-Mascheroni constant (A001620) and Zeta'(2) = -0.9375482543158437537... (see A073002) [user Lucia, MathOverflow, 2014]. - Vaclav Kotesovec, Jan 05 2017

A127093 Triangle read by rows: T(n,k)=k if k is a divisor of n; otherwise, T(n,k)=0 (1 <= k <= n).

Original entry on oeis.org

1, 1, 2, 1, 0, 3, 1, 2, 0, 4, 1, 0, 0, 0, 5, 1, 2, 3, 0, 0, 6, 1, 0, 0, 0, 0, 0, 7, 1, 2, 0, 4, 0, 0, 0, 8, 1, 0, 3, 0, 0, 0, 0, 0, 9, 1, 2, 0, 0, 5, 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 1, 2, 3, 4, 0, 6, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 14
Offset: 1

Views

Author

Gary W. Adamson, Jan 05 2007, Apr 04 2007

Keywords

Comments

Sum of terms in row n = sigma(n) (sum of divisors of n).
Euler's derivation of A127093 in polynomial form is in his proof of the formula for Sigma(n): (let S=Sigma, then Euler proved that S(n) = S(n-1) + S(n-2) - S(n-5) - S(n-7) + S(n-12) + S(n-15) - S(n-22) - S(n-26), ...).
[Young, pp. 365-366], Euler begins, s = (1-x)*(1-x^2)*(1-x^3)*... = 1 - x - x^2 + x^5 + x^7 - x^12 ...; log s = log(1-x) + log(1-x^2) + log(1-x^3) ...; differentiating and then changing signs, Euler has t = x/(1-x) + 2x^2/(1-x^2) + 3x^3/(1-x^3) + 4x^4/(1-x^4) + 5x^5/(1-x^5) + ...
Finally, Euler expands each term of t into a geometric series, getting A127093 in polynomial form: t =
x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + ...
+ 2x^2 + 2x^4 + 2x^6 + 2x^8 + ...
+ 3x^3 + 3x^6 + ...
+ 4x^4 + 4x^8 + ...
+ 5x^5 + ...
+ 6x^6 + ...
+ 7x^7 + ...
+ 8x^8 + ...
T(n,k) is the sum of all the k-th roots of unity each raised to the n-th power. - Geoffrey Critzer, Jan 02 2016
From Davis Smith, Mar 11 2019: (Start)
For n > 1, A020639(n) is the leftmost term, other than 0 or 1, in the n-th row of this array. As mentioned in the Formula section, the k-th column is period k: repeat [k, 0, 0, ..., 0], but this also means that it's the characteristic function of the multiples of k multiplied by k. T(n,1) = A000012(n), T(n,2) = 2*A059841(n), T(n,3) = 3*A079978(n), T(n,4) = 4*A121262(n), T(n,5) = 5*A079998(n), and so on.
The terms in the n-th row, other than 0, are the factors of n. If n > 1 and for every k, 1 <= k < n, T(n,k) = 0 or 1, then n is prime. (End)
From Gary W. Adamson, Aug 07 2019: (Start)
Row terms of the triangle can be used to calculate E(n) in A002654): (1, 1, 0, 1, 2, 0, 0, 1, 1, 2, ...), and A004018, the number of points in a square lattice on the circle of radius sqrt(n), A004018: (1, 4, 4, 0, 4, 8, 0, 0, 4, ...).
As to row terms in the triangle, let E(n) of even terms = 0,
E(integers of the form 4*k - 1 = (-1), and E(integers of the form 4*k + 1 = 1.
Then E(n) is the sum of the E(n)'s of the factors of n in the triangle rows. Example: E(10) = Sum: ((E(1) + E(2) + E(5) + E(10)) = ((1 + 0 + 1 + 0) = 2, matching A002654(10).
To get A004018, multiply the result by 4, getting A004018(10) = 8.
The total numbers of lattice points = 4r^2 = E(1) + ((E(2))/2 + ((E(3))/3 + ((E(4))/4 + ((E(5))/5 + .... Since E(even integers) are zero, E(integers of the form (4*k - 1)) = (-1), and E(integers of the form (4*k + 1)) = (+1); we are left with 4r^2 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - ..., which is approximately equal to Pi(r^2). (End)
T(n,k) is also the number of parts in the partition of n into k equal parts. - Omar E. Pol, May 05 2020

Examples

			T(8,4) = 4 since 4 divides 8.
T(9,3) = 3 since 3 divides 9.
First few rows of the triangle:
  1;
  1, 2;
  1, 0, 3;
  1, 2, 0, 4;
  1, 0, 0, 0, 5;
  1, 2, 3, 0, 0, 6;
  1, 0, 0, 0, 0, 0, 7;
  1, 2, 0, 4, 0, 0, 0, 8;
  1, 0, 3, 0, 0, 0, 0, 0, 9;
  ...
		

References

  • David Wells, "Prime Numbers, the Most Mysterious Figures in Math", John Wiley & Sons, 2005, appendix.
  • L. Euler, "Discovery of a Most Extraordinary Law of the Numbers Concerning the Sum of Their Divisors"; pp. 358-367 of Robert M. Young, "Excursions in Calculus, An Interplay of the Continuous and the Discrete", MAA, 1992. See p. 366.

Crossrefs

Reversal = A127094
Cf. A027750.
Cf. A000012 (the first column), A020639, A059841 (the second column when multiplied by 2), A079978 (the third column when multiplied by 2), A079998 (the fifth column when multiplied by 5), A121262 (the fourth column when multiplied by 4).

Programs

  • Excel
    mod(row()-1;column()) - mod(row();column()) + 1 - Mats Granvik, Aug 31 2007
    
  • Haskell
    a127093 n k = a127093_row n !! (k-1)
    a127093_row n = zipWith (*) [1..n] $ map ((0 ^) . (mod n)) [1..n]
    a127093_tabl = map a127093_row [1..]
    -- Reinhard Zumkeller, Jan 15 2011
    
  • Maple
    A127093:=proc(n,k) if type(n/k, integer)=true then k else 0 fi end:
    for n from 1 to 16 do seq(A127093(n,k),k=1..n) od; # yields sequence in triangular form - Emeric Deutsch, Jan 20 2007
  • Mathematica
    t[n_, k_] := k*Boole[Divisible[n, k]]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 17 2014 *)
    Table[ SeriesCoefficient[k*x^k/(1 - x^k), {x, 0, n}], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 14 2015 *)
  • PARI
    trianglerows(n) = for(x=1, n, for(k=1, x, if(x%k==0, print1(k, ", "), print1("0, "))); print(""))
    /* Print initial 9 rows of triangle as follows: */
    trianglerows(9) \\ Felix Fröhlich, Mar 26 2019

Formula

k-th column is composed of "k" interspersed with (k-1) zeros.
Let M = A127093 as an infinite lower triangular matrix and V = the harmonic series as a vector: [1/1, 1/2, 1/3, ...]. then M*V = d(n), A000005: [1, 2, 2, 3, 2, 4, 2, 4, 3, 4, ...]. M^2 * V = A060640: [1, 5, 7, 17, 11, 35, 15, 49, 34, 55, ...]. - Gary W. Adamson, May 10 2007
T(n,k) = ((n-1) mod k) - (n mod k) + 1 (1 <= k <= n). - Mats Granvik, Aug 31 2007
T(n,k) = k * 0^(n mod k). - Reinhard Zumkeller, Jan 15 2011
G.f.: Sum_{k>=1} k * x^k * y^k/(1-x^k) = Sum_{m>=1} x^m * y/(1 - x^m*y)^2. - Robert Israel, Aug 08 2016
T(n,k) = Sum_{d|k} mu(k/d)*sigma(gcd(n,d)). - Ridouane Oudra, Apr 05 2025

A057723 Sum of positive divisors of n that are divisible by every prime that divides n.

Original entry on oeis.org

1, 2, 3, 6, 5, 6, 7, 14, 12, 10, 11, 18, 13, 14, 15, 30, 17, 24, 19, 30, 21, 22, 23, 42, 30, 26, 39, 42, 29, 30, 31, 62, 33, 34, 35, 72, 37, 38, 39, 70, 41, 42, 43, 66, 60, 46, 47, 90, 56, 60, 51, 78, 53, 78, 55, 98, 57, 58, 59, 90, 61, 62, 84, 126, 65, 66, 67, 102, 69, 70
Offset: 1

Views

Author

Leroy Quet, Oct 27 2000

Keywords

Examples

			The divisors of 12 that are divisible by both 2 and 3 are 6 and 12. So a(12) = 6 + 12 = 18.
		

Crossrefs

Row sums of triangle A284318.
Cf. A000203 (sigma), A007947 (rad), A005361 (number of these divisors).
Cf. A049060 and A060640 (other sigma-like functions).

Programs

  • Magma
    [&*PrimeDivisors(n)*SumOfDivisors(n div &*PrimeDivisors(n)): n in [1..70]]; // Vincenzo Librandi, May 14 2015
    
  • Maple
    seq(mul(f[1]*(f[1]^f[2]-1)/(f[1]-1), f = ifactors(n)[2]), n = 1 .. 100); # Robert Israel, May 13 2015
  • Mathematica
    Table[(b = Times @@ FactorInteger[n][[All, 1]])*DivisorSigma[1, n/b], {n, 70}] (* Ivan Neretin, May 13 2015 *)
    f[p_, e_] := (p^(e+1)-1)/(p-1) - 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 15 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, f[i,2]=1); my(pp = factorback(f)); sumdiv(n, d, if (! (d % pp), d, 0));} \\ Michel Marcus, May 14 2015

Formula

If n = Product p_i^e_i then a(n) = Product (p_i + p_i^2 + ... + p_i^e_i).
a(n) = rad(n)*sigma(n/rad(n)) = A007947(n)*A000203(A003557(n)). - Ivan Neretin, May 13 2015
Dirichlet g.f.: zeta(s) * zeta(s-1) * Product(p prime, 1 - p^(-s) + p^(1-2*s)). - Robert Israel, May 13 2015
Sum_{k=1..n} a(k) ~ c * Pi^2 * n^2 / 12, where c = A330596 = Product_{primes p} (1 - 1/p^2 + 1/p^3) = 0.7485352596823635646442150486379106016416403430053244045... - Vaclav Kotesovec, Dec 18 2019
a(n) = Sum_{d|n, rad(d)=rad(n)} d. - R. J. Mathar, Jun 02 2020
Lim_{n->oo} (1/n) * Sum_{k=1..n} a(k)/k = Product_{p prime}(1 + 1/(p*(p^2-1))) = 1.231291... (A065487). - Amiram Eldar, Jun 10 2020
a(n) = Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(n/d) * sigma(d). - Ilya Gutkovskiy, Apr 15 2021

A049060 a(n) = (-1)^omega(n)*Sum_{d|n} d*(-1)^omega(d), where omega(n) = A001221(n) is number of distinct primes dividing n.

Original entry on oeis.org

1, 1, 2, 5, 4, 2, 6, 13, 11, 4, 10, 10, 12, 6, 8, 29, 16, 11, 18, 20, 12, 10, 22, 26, 29, 12, 38, 30, 28, 8, 30, 61, 20, 16, 24, 55, 36, 18, 24, 52, 40, 12, 42, 50, 44, 22, 46, 58, 55, 29, 32, 60, 52, 38, 40, 78, 36, 28, 58, 40, 60, 30, 66, 125, 48, 20, 66, 80, 44, 24, 70
Offset: 1

Views

Author

Keywords

Comments

Might be called (-1)sigma(n). If x = Product p_i^r_i, then (-1)sigma(x) = Product (-1 + Sum p_i^s_i, s_i = 1 to r_i) = Product ((p_i^(r_i+1)-1)/(p_i-1)-2), with (-1)sigma(1) = 1. - Yasutoshi Kohmoto, May 23 2005

Crossrefs

Programs

  • Maple
    A049060 := proc(n) local it, ans, i, j; it := ifactors(n): ans := 1: for i from 1 to nops(ifactors(n)[2]) do ans := ans*(-1+sum(ifactors(n)[2][i][1]^j, j=1..ifactors(n)[2][i][2])): od: RETURN(ans) end: [seq(A049060(i),i=1..n)];
  • Mathematica
    a[p_?PrimeQ] := p-1; a[1] = 1; a[n_] := Times @@ ((#[[1]]^(#[[2]] + 1) - 2*#[[1]] + 1)/(#[[1]] - 1) & ) /@ FactorInteger[n]; Table[a[n], {n, 1, 71}] (* Jean-François Alcover, May 21 2012 *)
  • PARI
    A049060(n)={ local(i,resul,rmax,p) ; if(n==1, return(1) ) ; i=factor(n) ; rmax=matsize(i)[1] ; resul=1 ; for(r=1,rmax, p=0 ; for(j=1,i[r,2], p += i[r,1]^j ; ) ; resul *= p-1 ; ) ; return(resul) ; } { for(n=1,40, print(n," ",A049060(n)) ) ; } \\ R. J. Mathar, Oct 12 2006
    
  • PARI
    apply( A049060(n)=vecprod([(f[1]^(f[2]+1)-1)\(f[1]-1)-2 | f<-factor(n)~]), [1..99]) \\ M. F. Hasler, Sep 21 2022
    
  • Python
    from math import prod
    from sympy import factorint
    def A049060(n): return prod((p**(e+1)-2*p+1)//(p-1) for p,e in factorint(n).items()) # Chai Wah Wu, Sep 13 2021

Formula

a(n) = Sum_{d|n} d*(-1)^A001221(d).
Multiplicative with a(p^e) = (p^(e+1)-2*p+1)/(p-1).
Simpler: a(p^e) = (p^(e+1)-1)/(p-1)-2. - M. F. Hasler, Sep 21 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/12) * Product_{p prime} (1 - 2/p^2 + 2/p^3) = 0.4478559359... . - Amiram Eldar, Oct 25 2022

Extensions

More terms from James Sellers, May 03 2000
Better description from Vladeta Jovovic, Apr 06 2002

A288098 Convolution inverse of A006171.

Original entry on oeis.org

1, -1, -2, 0, 0, 4, 1, 3, 0, -5, 0, -7, -6, -4, 7, 0, 6, 9, 11, 10, -2, 13, -13, -10, -17, -20, -25, 0, -11, -11, -2, 11, 41, 27, 41, 17, 58, 12, 27, -21, -2, -36, -67, -52, -59, -95, -75, -20, -89, 35, 0, 62, 41, 142, 97, 172, 63, 154, 148, 85, 110, -36, -17, -156
Offset: 0

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Crossrefs

Product_{k>=1} (1 - x^k)^sigma_m(k): this sequence (m=0), A288385 (m=1), A288389 (m=2), A288392 (m=3).

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[Product[(1 - x^(i*j)), {i, 1, nmax}, {j, 1, nmax/i}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2018 *)
    nmax = 50; CoefficientList[Series[Product[(1 - x^k)^DivisorSigma[0, k], {k, 1, nmax}], {x, 0, nmax}], x]  (* Vaclav Kotesovec, Aug 28 2018 *)
    nmax = 50; s = 1 - x; Do[s *= Sum[Binomial[DivisorSigma[0, k], j]*(-1)^j*x^(j*k), {j, 0, nmax/k}]; s = Expand[s]; s = Take[s, Min[nmax + 1, Exponent[s, x] + 1, Length[s]]];, {k, 2, nmax}]; Take[CoefficientList[s, x], nmax] (* Vaclav Kotesovec, Aug 28 2018 *)

Formula

G.f.: Product_{n>=1} E(q^n) where E(q) = Product_{n>=1} (1-q^n).
a(0) = 1, a(n) = -(1/n)*Sum_{k=1..n} A060640(k)*a(n-k) for n > 0.
G.f.: exp(-Sum_{k>=1} sigma(k)*x^k/(k*(1 - x^k))). - Ilya Gutkovskiy, Aug 26 2018

A064945 a(n) = Sum_{i|n, j|n, j >= i} i.

Original entry on oeis.org

1, 4, 5, 11, 7, 22, 9, 26, 18, 30, 13, 64, 15, 38, 38, 57, 19, 82, 21, 87, 48, 54, 25, 156, 38, 62, 58, 109, 31, 179, 33, 120, 68, 78, 68, 244, 39, 86, 78, 213, 43, 224, 45, 153, 143, 102, 49, 348, 66, 166, 98, 175, 55, 268, 96, 267, 108, 126, 61, 542, 63, 134, 181
Offset: 1

Views

Author

Vladeta Jovovic, Oct 28 2001

Keywords

Examples

			a(6) = dot_product(4,3,2,1)*(1,2,3,6) = 4*1+3*2+2*3+1*6 = 22.
		

Crossrefs

Programs

  • Haskell
    a064945 = sum . zipWith (*) [1..] . reverse . a027750_row'
    -- Reinhard Zumkeller, Jul 14 2015
    
  • Maple
    with(numtheory): seq(add((tau(n)-i+1)*sort(convert(divisors(n),'list'))[i],i=1..tau(n)), n=1..200);
  • Mathematica
    A064945[n_] := #.Range[Length[#], 1, -1] & [Divisors[n]];
    Array[A064945, 100] (* Paolo Xausa, Aug 07 2025 *)
  • PARI
    a(n) = my(d=divisors(n), t=length(d)); sum(i=1, t, (t - i + 1)*d[i]); \\ Harry J. Smith, Oct 01 2009
    
  • PARI
    a(n)=my(d=divisors(n)); sum(i=1,#d,(#d+1-i)*d[i]) \\ Charles R Greathouse IV, Jun 10 2015
    
  • Python
    from sympy import divisors, divisor_sigma
    def A064945(n): return (divisor_sigma(n,0)+1)*divisor_sigma(n)-sum(a*b for a, b in enumerate(divisors(n),1)) # Chai Wah Wu, Aug 07 2025

Formula

a(n) = Sum_{i=1..tau(n)} (tau(n)-i+1)*d_i, where {d_i}, i=1..tau(n), is the increasing sequence of divisors of n.
a(n) = Sum_{i=1..A000005(n)} (A000005(n)-i+1)*A027750(n, i). - Michel Marcus, Jun 10 2015
From Ridouane Oudra, Aug 02 2025: (Start)
a(n) = Sum_{d|n} d*A135539(n,d).
a(n) = A064947(n) + A000203(n).
a(n) = (A064949(n) + A000203(n))/2.
a(n) = A064949(n) - A064947(n).
a(n) = A337360(n) - A064944(n).
a(n) = A064840(n) - A064946(n). (End)

A191161 Hypersigma(n), definition 2: sum of the divisors of n plus the recursive sum of the divisors of the proper divisors.

Original entry on oeis.org

1, 4, 5, 12, 7, 22, 9, 32, 19, 30, 13, 72, 15, 38, 37, 80, 19, 90, 21, 96, 47, 54, 25, 208, 39, 62, 65, 120, 31, 178, 33, 192, 67, 78, 65, 316, 39, 86, 77, 272, 43, 222, 45, 168, 147, 102, 49, 560, 67, 174, 97, 192, 55
Offset: 1

Views

Author

Alonso del Arte, May 26 2011

Keywords

Comments

In wanting to ensure the definition was not arbitrary, I initially thought that 1s had to stop the recursion. But as T. D. Noe showed me, this doesn't have to be the case: the 1s can be included in the recursion.

Crossrefs

Cf. A000203, A191150, A202687, A255242, A378211 (Dirichlet inverse).
Sequences that appear in the convolution formulas: A000010, A000203, A007429, A038040, A060640, A067824, A074206, A174725, A253249, A323910, A323912, A330575.

Programs

  • Mathematica
    hsTD[n_] := hsTD[n] = Module[{d = Divisors[n]}, Total[d] + Total[hsTD /@ Most[d]]]; Table[hsTD[n], {n, 100}] (* From T. D. Noe *)
  • PARI
    a(n)=sumdiv(n,d,if(dCharles R Greathouse IV, Dec 20 2011

Formula

a(n) = sigma(n) + sum_{d | n, d < n} a(d). - Charles R Greathouse IV, Dec 20 2011
From Antti Karttunen, Nov 22 2024: (Start)
Following formulas were conjectured by Sequence Machine:
For n > 1, a(n) = A191150(n) + A074206(n).
a(n) = A330575(n) + A255242(n) = 2*A255242(n) + n = 2*A330575(n) - n.
a(n) = Sum_{d|n} A330575(d).
a(n) = Sum_{d|n} d*A067824(n/d).
a(n) = Sum_{d|n} A000203(d)*A074206(n/d).
a(n) = Sum_{d|n} A007429(d)*A174725(n/d).
a(n) = Sum_{d|n} A000010(d)*A253249(n/d).
a(n) = Sum_{d|n} A038040(d)*A323912(n/d).
a(n) = Sum_{d|n} A060640(d)*A323910(n/d).
(End)

A374777 Numerator of the mean abundancy index of the divisors of n.

Original entry on oeis.org

1, 5, 7, 17, 11, 35, 15, 49, 34, 11, 23, 119, 27, 75, 77, 129, 35, 85, 39, 187, 5, 115, 47, 343, 86, 135, 71, 85, 59, 77, 63, 107, 161, 175, 33, 289, 75, 195, 63, 539, 83, 25, 87, 391, 187, 235, 95, 301, 54, 43, 245, 153, 107, 355, 23, 105, 91, 295, 119, 1309, 123, 315
Offset: 1

Views

Author

Amiram Eldar, Jul 19 2024

Keywords

Comments

First differs from A318491 at n = 27.
The abundancy index of a number k is sigma(k)/k = A017665(k)/A017666(k).

Examples

			For n = 2, n has 2 divisors, 1 and 2. Their abundancy indices are sigma(1)/1 = 1 and sigma(2)/2 = 3/2, and their mean abundancy index is (1 + 3/2)/2 = 5/4. Therefore a(2) = numerator(5/4) = 5.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := ((e+1)*p^2 - (e+2)*p + p^(-e))/((e+1)*(p-1)^2); a[1] = 1; a[n_] := Numerator[Times @@ f @@@ FactorInteger[n]]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n), p, e); numerator(prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; ((e+1)*p^2 - (e+2)*p + p^(-e))/((e+1)*(p-1)^2)));}

Formula

Let f(n) = a(n)/A374778(n). Then:
f(n) = (Sum_{d|n} sigma(d)/d) / tau(n), where sigma(n) is the sum of divisors of n (A000203), and tau(n) is their number (A000005).
f(n) is multiplicative with f(p^e) = ((e+1)*p^2 - (e+2)*p + p^(-e))/((e+1)*(p-1)^2).
f(n) = A318491(n)/(A318492(n)*A000005(n)).
f(n) = (Sum_{d|n} d*tau(d)) / (n*tau(n)) = A060640(n)/A038040(n).
Dirichlet g.f. of f(n): zeta(s) * Product_{p prime} ((p/(p-1)^2) * ((p^s-1)*log((1-1/p^s)/(1-1/p^(s+1))) + p-1)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} f(k) = Product_{p prime} ((p/(p-1)) * (1 - log(1 + 1/p))) = 1.3334768464... . For comparison, the asymptotic mean of the abundancy index over all the positive integers is zeta(2) = 1.644934... (A013661).
Lim sup_{n->oo} f(n) = oo (i.e., f(n) is unbounded).

A109386 G.f. is the logarithm of the g.f. of A107742: Sum_{n>=1} (a(n)/n)*x^n = log( Sum_{n>=0} A107742(n)*x^n ).

Original entry on oeis.org

1, 3, 7, 7, 11, 21, 15, 15, 34, 33, 23, 49, 27, 45, 77, 31, 35, 102, 39, 77, 105, 69, 47, 105, 86, 81, 142, 105, 59, 231, 63, 63, 161, 105, 165, 238, 75, 117, 189, 165, 83, 315, 87, 161, 374, 141, 95, 217, 162, 258, 245, 189, 107, 426, 253, 225, 273, 177, 119, 539, 123, 189, 510, 127, 297
Offset: 1

Views

Author

Paul D. Hanna, Jun 26 2005

Keywords

Crossrefs

Sum_{d|n} d^k*A000593(n/d): A288417 (k=0), this sequence (k=1), A288418 (k=2), A288419 (k=3), A288420 (k=4).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, #*DivisorSum[#, Mod[#, 2]&]&]; Array[a, 65] (* Jean-François Alcover, Dec 23 2015 *)
    f[p_, e_] := ((p + e*(p-1) - 2)*p^(e+1) + 1)/(p-1)^2; f[2, e_] := 2^(e+1) - 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 29 2023 *)
  • PARI
    a(n)=sumdiv(n,d,d*sumdiv(d,m,m%2))
    
  • PARI
    N=66; x='x+O('x^N); /* that many terms */
    c=sum(j=1, N, j*x^j);
    t=log( 1/prod(j=0, N, eta(x^(2*j+1))) );
    gf=serconvol(t, c);
    Vec(gf) /* show terms */
    /* Joerg Arndt, May 03 2008 */

Formula

a(n) = Sum_{d|n} d * Sum_{m|d} (m mod 2).
G.f.: Sum_{n>=1} a(n)/n*x^n = Sum_{j>=1} Sum_{i>=1} log(1+x^(i*j)).
From Vladeta Jovovic, Jul 05 2005:(Start)
Multiplicative with a(2^e) = 2^(e+1)-1 and a(p^e) = (p^(e+2)*(e+1)-p^(e+1)*(e+2)+1)/(p-1)^2 for p>2.
G.f.: Sum_{n>0} n*A000005(n)*x^n/(1+x^n).
G.f.: Sum_{n>0} n*A001227(n)*x^n/(1-x^n).
a(n) = A060640(n) if n is odd, else a(n) = A060640(n) - 2*A060640(n/2).
a(n) = Sum_{d|n} d*A001227(d).
a(n) = Sum_{d|n} d*A000593(n/d).
A107742(n) = (1/n)*Sum_{k=1..n} a(k)*A107742(n-k). (End)
Showing 1-10 of 40 results. Next