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

A064602 Partial sums of A001157: Sum_{j=1..n} sigma_2(j).

Original entry on oeis.org

1, 6, 16, 37, 63, 113, 163, 248, 339, 469, 591, 801, 971, 1221, 1481, 1822, 2112, 2567, 2929, 3475, 3975, 4585, 5115, 5965, 6616, 7466, 8286, 9336, 10178, 11478, 12440, 13805, 15025, 16475, 17775, 19686, 21056, 22866, 24566, 26776, 28458, 30958
Offset: 1

Views

Author

Labos Elemer, Sep 24 2001

Keywords

Comments

In general, for m >= 0 and j >= 0, Sum_{k=1..n} k^m * sigma_j(k) = Sum_{k=1..s} (k^m * F_{m+j}(floor(n/k)) + k^(m+j) * F_m(floor(n/k))) - F_{m+j}(s) * F_m(s), where s = floor(sqrt(n)) and F_m(x) are the Faulhaber polynomials defined as F_m(x) = (Bernoulli(m+1, x+1) - Bernoulli(m+1, 1)) / (m+1). - Daniel Suteu, Nov 27 2020

Crossrefs

Programs

  • Mathematica
    Accumulate@ Array[DivisorSigma[2, #] &, 42] (* Michael De Vlieger, Jan 02 2017 *)
  • PARI
    a(n) = sum(j=1, n, sigma(j, 2)); \\ Michel Marcus, Dec 15 2013
    
  • PARI
    f(n) = n*(n+1)*(2*n+1)/6; \\ A000330
    a(n) = my(s=sqrtint(n)); sum(k=1, s, f(n\k) + k^2*(n\k)) - s*f(s); \\ Daniel Suteu, Nov 26 2020
    
  • Python
    from math import isqrt
    def f(n): return n*(n+1)*(2*n+1)//6
    def a(n):
        s = isqrt(n)
        return sum(f(n//k) + k*k*(n//k) for k in range(1, s+1)) - s*f(s)
    print([a(k) for k in range(1, 43)]) # Michael S. Branicky, Oct 01 2022 after Daniel Suteu

Formula

a(n) = a(n-1) + A001157(n) = Sum_{j=1..n} sigma_2(j) where sigma_2(j) = A001157(j).
a(n) = Sum_{i=1..n} i^2 * floor(n/i). - Enrique Pérez Herrero, Sep 15 2012
G.f.: (1/(1 - x))*Sum_{k>=1} k^2*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 02 2017
a(n) ~ zeta(3) * n^3 / 3. - Vaclav Kotesovec, Sep 02 2018
a(n) = Sum_{k=1..s} (A000330(floor(n/k)) + k^2*floor(n/k)) - s*A000330(s), where s = floor(sqrt(n)). - Daniel Suteu, Nov 26 2020

A053822 Dirichlet inverse of sigma_2 function (A001157).

Original entry on oeis.org

1, -5, -10, 4, -26, 50, -50, 0, 9, 130, -122, -40, -170, 250, 260, 0, -290, -45, -362, -104, 500, 610, -530, 0, 25, 850, 0, -200, -842, -1300, -962, 0, 1220, 1450, 1300, 36, -1370, 1810, 1700, 0, -1682, -2500, -1850, -488, -234, 2650, -2210, 0, 49, -125, 2900, -680
Offset: 1

Views

Author

N. J. A. Sloane, Apr 08 2000

Keywords

Comments

sigma_2(n) is the sum of the squares of the divisors of n (A001157).

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 39.

Crossrefs

Dirichlet inverse of sigma_k(n): A007427 (k = 0), A046692 (k = 1), A053825 (k = 3), A053826 (k = 4), A178448 (k = 5).
Cf. A001157,.

Programs

  • Maple
    f1:= proc(p,e) if e = 1 then -1-p^2 elif e=2 then p^2 else 0 fi end proc:
    f:= n -> mul(f1(t[1],t[2]),t=ifactors(n)[2]);
    map(f, [$1..100]); # Robert Israel, Jan 29 2018
  • Mathematica
    a[n_] := Sum[MoebiusMu[n/d] MoebiusMu[d] d^2, {d, Divisors[n]}];
    Array[a, 100] (* Jean-François Alcover, Mar 05 2019, after Ilya Gutkovskiy *)
    f[p_, e_] := If[e == 1, -p^2 - 1, If[e == 2, p^2, 0]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    seq(n)={dirdiv(vector(n, n, n==1), vector(n, n, sigma(n, 2)))} \\ Andrew Howroyd, Aug 05 2018
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 - X)*(1 - p^2*X))[n], ", ")) \\ Vaclav Kotesovec, Sep 16 2020

Formula

Dirichlet g.f.: 1/(zeta(s)*zeta(s-2)).
Multiplicative with a(p^1) = -1-p^2, a(p^2) = p^2, a(p^e) = 0 for e>=3. - Mitch Harris, Jun 27 2005
a(n) = Sum_{d|n} mu(n/d)*mu(d)*d^2. - Ilya Gutkovskiy, Nov 06 2018
From Peter Bala, Jan 26 2024: (Start)
a(n) = Sum_{d divides n} d * (sigma(d))^(-1) * phi(n/d), where (sigma(n))^(-1) = A046692(n) denotes the Dirichlet inverse of sigma(n) = A000203(n).
a(n) = Sum_{d divides n} d^2 * (sigma_k(d))^(-1) * J_(k+2)(n/d) for k >= 0, where (sigma_k(n))^(-1) denotes the Dirichlet inverse of the divisor sum function sigma_k(n) and J_k(n) denotes the Jordan totient function. (End)

A082069 Smallest common prime-divisor of n and Sigma_2(n) = A001157(n); a(n) = 1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 5, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 5, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 7, 1, 5, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 5
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; f1[x_] := n; f2[x_] := DivisorSigma[2, x]; Table[Min[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    A082069(n) = A020639(gcd(sigma(n,2), n)); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = A020639(A179930(n)). - Antti Karttunen, Nov 03 2017

Extensions

Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082065 Greatest common prime-divisor of phi(n)=A000010(n) and sigma(2,n) = A001157(n); a(n) = 1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 5, 2, 2, 1, 2, 2, 3, 2, 2, 2, 1, 5, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 1, 2, 5, 2, 2, 2, 2, 2, 1, 2, 2, 5, 3, 5, 2, 2, 2, 1, 5, 2, 3, 2, 2, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 3, 2, 1
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Maple
    gcpd := proc(a,b) local g ,d ; g := 1 ; for d in numtheory[divisors](a) intersect numtheory[divisors](b) do if isprime(d) then g := max(g,d) ; end if; end do: g ; end proc:
    A082065 := proc(n) gcpd( numtheory[phi](n), numtheory[sigma][2](n) ) ; end proc:
    seq(A082065(n),n=1..120) ; # R. J. Mathar, Jul 09 2011
  • Mathematica
    Table[FactorInteger[GCD[EulerPhi@ n, DivisorSigma[2, n]]][[-1, 1]], {n, 100}] (* Michael De Vlieger, Jul 22 2017 *)
  • PARI
    gpf(n)=if(n>1,my(f=factor(n)[,1]);f[#f],1)
    a(n)=gpf(gcd(eulerphi(n),sigma(n,2))) \\ Charles R Greathouse IV, Feb 21 2013

Extensions

Values corrected by R. J. Mathar, Jul 09 2011
Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082066 Greatest common prime-divisor of sigma_1(n)=A000203(n) and sigma_2(n)=A001157(n); a(n)=1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 2, 7, 2, 2, 2, 5, 13, 2, 2, 7, 2, 2, 2, 31, 2, 13, 2, 7, 2, 2, 2, 5, 31, 2, 5, 7, 2, 2, 2, 7, 2, 2, 2, 13, 2, 5, 2, 5, 2, 2, 2, 7, 13, 2, 2, 31, 19, 31, 2, 7, 2, 5, 2, 5, 5, 5, 2, 7, 2, 2, 13, 127, 2, 2, 2, 7, 2, 2, 2, 13, 2, 2, 31, 7, 2, 2, 2, 31, 11, 2, 2, 7, 2, 2, 5, 5, 2, 13, 2, 7, 2, 2, 2, 7, 2
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] f1[x_] := DivisorSigma[1, n]; f2[x_] := DivisorSigma[2, x] Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    Table[Last[Apply[Intersection, FactorInteger[Map[DivisorSigma[#, n] &, {1, 2}]][[All, All, 1]]] /. {} -> {1}], {n, 109}] (* Michael De Vlieger, May 22 2017 *)
  • PARI
    gpf(n)=if(n>1,my(f=factor(n)[,1]);f[#f],1)
    a(n)=gpf(gcd(sigma(n),sigma(n,2))) \\ Charles R Greathouse IV, Feb 19 2013
    
  • Python
    from sympy import primefactors, gcd, divisor_sigma
    def a006530(n): return 1 if n==1 else primefactors(n)[-1]
    def a(n): return a006530(gcd(divisor_sigma(n), divisor_sigma(n, 2))) # Indranil Ghosh, May 22 2017

Formula

a(n) = A006530(A179931(n)). - Reinhard Zumkeller, Jul 10 2011

Extensions

Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082063 Greatest common prime divisor of n and sigma_2(n) = A001157(n), or 1 if the two are relatively prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 3, 1, 2, 5, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 7, 1, 5, 1, 1, 1, 2, 5, 3, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 7, 1, 13, 2, 1, 2, 1, 5, 1, 1, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2, 1, 7, 5, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 5
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    (* factors/exponent SET *) ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; f1[x_] := x; f2[x_] := DivisorSigma[2, x]; Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    Array[If[CoprimeQ[#1, #2], 1, Max@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    A006530(n) = if(1==n, n, vecmax(factor(n)[, 1]));
    A082063(n) = A006530(gcd(sigma(n,2), n)); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = A006530(A179930(n)). - Antti Karttunen, Nov 03 2017

Extensions

Erroneous comment removed by Antti Karttunen, Nov 03 2017

A082071 Smallest common prime-divisor of phi(n) = A000010(n) and sigma_2(n) = A001157(n); a(n)=1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {EulerPhi@ #,
    DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    A082071(n) = A020639(gcd(eulerphi(n),sigma(n,2))); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = A020639(gcd(A000010(n), A001157(n))). - Antti Karttunen, Nov 03 2017

Extensions

Values corrected by R. J. Mathar, Jul 09 2011
More terms from Antti Karttunen, Nov 03 2017
Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082072 Smallest prime that divides sigma(n) = A000203(n) and sigma_2(n) = A001157(n), or 1 if sigma(n) and sigma_2(n) are relatively prime.

Original entry on oeis.org

1, 1, 2, 7, 2, 2, 2, 5, 13, 2, 2, 2, 2, 2, 2, 31, 2, 13, 2, 2, 2, 2, 2, 2, 31, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 127, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 7, 2, 2
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; f1[x_] := DivisorSigma[1, x]; f2[x_] := DivisorSigma[2, x]; Table[Min[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {DivisorSigma[1, #], DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    lpf(n)=my(f=factor(n)[,1]); if(#f,f[1],1)
    a(n)=lpf(gcd(sigma(n),sigma(n,2))) \\ Charles R Greathouse IV, Feb 14 2013

Formula

a(n) = A020639(A179931(n)). - Antti Karttunen, Nov 03 2017

Extensions

Name edited by Antti Karttunen after an example by N. J. A. Sloane, Nov 04 2017

A203849 a(n) = sigma_2(n)*Fibonacci(n), where sigma_2(n) = A001157(n), the sum of squares of divisors of n.

Original entry on oeis.org

1, 5, 20, 63, 130, 400, 650, 1785, 3094, 7150, 10858, 30240, 39610, 94250, 158600, 336567, 463130, 1175720, 1513522, 3693690, 5473000, 10803710, 15188210, 39412800, 48841275, 103184050, 161062760, 333701550, 432980818, 1081652000, 1295110778, 2973391785, 4299985160
Offset: 1

Views

Author

Paul D. Hanna, Jan 12 2012

Keywords

Comments

Compare g.f. to the Lambert series identity: Sum_{n>=1} n^2*x^n/(1-x^n) = Sum_{n>=1} sigma_2(n)*x^n.

Examples

			G.f.: A(x) = x + 5*x^2 + 20*x^3 + 63*x^4 + 130*x^5 + 400*x^6 + 650*x^7 +...
where A(x) = x/(1-x-x^2) + 2^2*1*x^2/(1-3*x^2+x^4) + 3^2*2*x^3/(1-4*x^3-x^6) + 4^2*3*x^4/(1-7*x^4+x^8) + 5^2*5*x^5/(1-11*x^5-x^10) + 6^2*8*x^6/(1-18*x^6+x^12) +...+ n^2*fibonacci(n)*x^n/(1 - Lucas(n)*x^n + (-1)^n*x^(2*n)) +...
		

Crossrefs

Cf. A203847, A203848, A203838, A001157 (sigma_2), A000204 (Lucas), A000045.

Programs

  • Mathematica
    Table[DivisorSigma[2, n]*Fibonacci[n], {n, 50}] (* G. C. Greubel, Jul 17 2018 *)
  • PARI
    {a(n)=sigma(n,2)*fibonacci(n)}
    
  • PARI
    {Lucas(n)=fibonacci(n-1)+fibonacci(n+1)}
    {a(n)=polcoeff(sum(m=1,n,m^2*fibonacci(m)*x^m/(1-Lucas(m)*x^m+(-1)^m*x^(2*m)+x*O(x^n))),n)}

Formula

G.f.: Sum_{n>=1} n^2*fibonacci(n)*x^n/(1 - Lucas(n)*x^n + (-1)^n*x^(2*n)) = Sum_{n>=1} sigma_2(n)*fibonacci(n)*x^n, where Lucas(n) = A000204(n).

A204272 a(n) = sigma_2(n)*Pell(n), where sigma_2(n) = A001157(n), the sum of squares of divisors of n.

Original entry on oeis.org

1, 10, 50, 252, 754, 3500, 8450, 34680, 89635, 309140, 700402, 2910600, 5688370, 20195500, 50706500, 160553712, 329639810, 1248615550, 2398289458, 8732957688, 19306982500, 56865638380, 119281100930, 461838762000, 853941516771
Offset: 1

Views

Author

Paul D. Hanna, Jan 14 2012

Keywords

Comments

Compare g.f. to the Lambert series identity: Sum_{n>=1} n^2*x^n/(1-x^n) = Sum_{n>=1} sigma_2(n)*x^n.

Examples

			G.f.: A(x) = x + 10*x^2 + 50*x^3 + 252*x^4 + 754*x^5 + 3500*x^6 +...
where A(x) = x/(1-2*x-x^2) + 2^2*2*x^2/(1-6*x^2+x^4) + 3^2*5*x^3/(1-14*x^3-x^6) + 4^2*12*x^4/(1-34*x^4+x^8) + 5^2*29*x^5/(1-82*x^5-x^10) + 6^2*70*x^6/(1-198*x^6+x^12) +...+ n^2*Pell(n)*x^n/(1 - A002203(n)*x^n + (-1)^n*x^(2*n)) +...
		

Crossrefs

Programs

  • Mathematica
    With[{nn=30},Times@@@Thread[{Rest[LinearRecurrence[{2,1},{0,1},nn+1]], DivisorSigma[ 2,Range[nn]]}]] (* Harvey P. Dale, Oct 21 2015 *)
  • PARI
    /* Subroutines used in PARI programs below: */
    {Pell(n)=polcoeff(x/(1-2*x-x^2+x*O(x^n)), n)}
    {A002203(n)=polcoeff(2*(1-x)/(1-2*x-x^2+x*O(x^n)), n)}
    
  • PARI
    {a(n)=sigma(n,2)*Pell(n)}
    
  • PARI
    {a(n)=polcoeff(sum(m=1,n,m^2*Pell(m)*x^m/(1-A002203(m)*x^m+(-1)^m*x^(2*m)+x*O(x^n))),n)}

Formula

G.f.: Sum_{n>=1} n^2*Pell(n)*x^n/(1 - A002203(n)*x^n + (-1)^n*x^(2*n)) = Sum_{n>=1} sigma_2(n)*Pell(n)*x^n, where Pell(n) = A000129(n) and A002203 is the companion Pell numbers.
Showing 1-10 of 424 results. Next