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-8 of 8 results.

A024916 a(n) = Sum_{k=1..n} k*floor(n/k); also Sum_{k=1..n} sigma(k) where sigma(n) = sum of divisors of n (A000203).

Original entry on oeis.org

1, 4, 8, 15, 21, 33, 41, 56, 69, 87, 99, 127, 141, 165, 189, 220, 238, 277, 297, 339, 371, 407, 431, 491, 522, 564, 604, 660, 690, 762, 794, 857, 905, 959, 1007, 1098, 1136, 1196, 1252, 1342, 1384, 1480, 1524, 1608, 1686, 1758, 1806, 1930, 1987, 2080, 2152
Offset: 1

Views

Author

Keywords

Comments

Row sums of triangle A128489. E.g., a(5) = 15 = (10 + 3 + 1 + 1), sum of row 4 terms of triangle A128489. - Gary W. Adamson, Jun 03 2007
Row sums of triangle A134867. - Gary W. Adamson, Nov 14 2007
a(10^4) = 82256014, a(10^5) = 8224740835, a(10^6) = 822468118437, a(10^7) = 82246711794796; see A072692. - M. F. Hasler, Nov 22 2007
Equals row sums of triangle A158905. - Gary W. Adamson, Mar 29 2009
n is prime if and only if a(n) - a(n-1) - 1 = n. - Omar E. Pol, Dec 31 2012
Also the alternating row sums of A236104. - Omar E. Pol, Jul 21 2014
a(n) is also the total number of parts in all partitions of the positive integers <= n into equal parts. - Omar E. Pol, Apr 30 2017
a(n) is also the total area of the terraces of the stepped pyramid with n levels described in A245092. - Omar E. Pol, Nov 04 2017
a(n) is also the area under the Dyck path described in the n-th row of A237593 (see example). - Omar E. Pol, Sep 17 2018
From Omar E. Pol, Feb 17 2020: (Start)
Convolution of A340793 and A000027.
Convolved with A340793 gives A000385. (End)
a(n) is also the number of cubic cells (or cubes) in the n-th level starting from the top of the stepped pyramid described in A245092. - Omar E. Pol, Jan 12 2022

Examples

			From _Omar E. Pol_, Aug 20 2021: (Start)
For n = 6 the sum of all divisors of the first six positive integers is [1] + [1 + 2] + [1 + 3] + [1 + 2 + 4] + [1 + 5] + [1 + 2 + 3 + 6] = 1 + 3 + 4 + 7 + 6 + 12 = 33, so a(6) = 33.
On the other hand the area under the Dyck path of the 6th diagram as shown below is equal to 33, so a(6) = 33.
Illustration of initial terms:                        _ _ _ _
                                        _ _ _        |       |_
                            _ _ _      |     |       |         |_
                  _ _      |     |_    |     |_ _    |           |
          _ _    |   |_    |       |   |         |   |           |
    _    |   |   |     |   |       |   |         |   |           |
   |_|   |_ _|   |_ _ _|   |_ _ _ _|   |_ _ _ _ _|   |_ _ _ _ _ _|
.
    1      4        8          15           21             33         (End)
		

References

  • Hardy and Wright, "An introduction to the theory of numbers", Oxford University Press, fifth edition, p. 266.

Crossrefs

Programs

  • Haskell
    a024916 n = sum $ map (\k -> k * div n k) [1..n]
    -- Reinhard Zumkeller, Apr 20 2015
    
  • Magma
    [(&+[DivisorSigma(1, k): k in [1..n]]): n in [1..60]]; // G. C. Greubel, Mar 15 2019
    
  • Maple
    A024916 := proc(n)
        add(numtheory[sigma](k),k=0..n) ;
    end proc: # Zerinvary Lajos, Jan 11 2009
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 0,
          numtheory[sigma](n)+a(n-1))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 12 2019
  • Mathematica
    Table[Plus @@ Flatten[Divisors[Range[n]]], {n, 50}] (* Alonso del Arte, Mar 06 2006 *)
    Table[Sum[n - Mod[n, m], {m, n}], {n, 50}] (* Roger L. Bagula and Gary W. Adamson, Oct 06 2006 *)
    a[n_] := Sum[DivisorSigma[1, k], {k, n}]; Table[a[n], {n, 51}] (* Jean-François Alcover, Dec 16 2011 *)
    Accumulate[DivisorSigma[1,Range[60]]] (* Harvey P. Dale, Mar 13 2014 *)
  • PARI
    A024916(n)=sum(k=1,n,n\k*k) \\ M. F. Hasler, Nov 22 2007
    
  • PARI
    A024916(z) = { my(s,u,d,n,a,p); s = z*z; u = sqrtint(z); p = 2; for(d=1, u, n = z\d - z\(d+1); if(n<=1, p=d; break(), a = z%d; s -= (2*a+(n-1)*d)*n/2); ); u = z\p; for(d=2, u, s -= z%d); return(s); } \\ See the link for a nicely formatted version. - P. L. Patodia (pannalal(AT)usa.net), Jan 11 2008
    
  • PARI
    A024916(n)={my(s=0,d=1,q=n);while(dPeter Polm, Aug 18 2014
    
  • PARI
    A024916(n)={ my(s=n^2, r=sqrtint(n), nd=n, D); for(d=1, r, (1>=D=nd-nd=n\(d+1)) && (r=d-1) && break; s -= n%d*D+(D-1)*D\2*d); s - sum(d=2, n\(r+1), n%d)} \\ Slightly optimized version of Patodia's code. - M. F. Hasler, Apr 18 2015
    (C#) See Polm link.
    
  • Python
    def A024916(n): return sum(k*(n//k) for k in range(1,n+1)) # Chai Wah Wu, Dec 17 2021
    
  • Python
    from math import isqrt
    def A024916(n): return (-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # Chai Wah Wu, Oct 21 2023
  • Sage
    [sum(sigma(k) for k in (1..n)) for n in (1..60)] # G. C. Greubel, Mar 15 2019
    

Formula

From Benoit Cloitre, Apr 28 2002: (Start)
a(n) = n^2 - A004125(n).
Asymptotically a(n) = n^2*Pi^2/12 + O(n*log(n)). (End)
G.f.: (1/(1-x))*Sum_{k>=1} x^k/(1-x^k)^2. - Benoit Cloitre, Apr 23 2003
a(n) = Sum_{m=1..n} (n - (n mod m)). - Roger L. Bagula and Gary W. Adamson, Oct 06 2006
a(n) = n^2*Pi^2/12 + O(n*log(n)^(2/3)) [Walfisz]. - Charles R Greathouse IV, Jun 19 2012
a(n) = A000217(n) + A153485(n). - Omar E. Pol, Jan 28 2014
a(n) = A000292(n) - A076664(n), n > 0. - Omar E. Pol, Feb 11 2014
a(n) = A078471(n) + A271342(n). - Omar E. Pol, Apr 08 2016
a(n) = (1/2)*(A222548(n) + A006218(n)). - Ridouane Oudra, Aug 03 2019
From Greg Dresden, Feb 23 2020: (Start)
a(n) = A092406(n) + 8, n>3.
a(n) = A160664(n) - 1, n>0. (End)
a(2*n) = A326123(n) + A326124(n). - Vaclav Kotesovec, Aug 18 2021
a(n) = Sum_{k=1..n} k * A010766(n,k). - Georg Fischer, Mar 04 2022

A072691 Decimal expansion of Pi^2/12.

Original entry on oeis.org

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

Views

Author

Rick L. Shepherd, Jul 02 2002

Keywords

Examples

			0.822467033424113218236207583323..
		

References

  • C. C. Clawson, The Beauty and Magic of Numbers. New York: Plenum Press (1996): 98
  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 2.11 p. 126 and section 8.5 p. 501.
  • Jolley, Summation of Series, Dover (1961) eq. (234) page 44.

Crossrefs

Cf. A072692 (Pi^2/12 is in asymptotic formula related to sigma(n), A000203).
Cf. A113319 (sum_{i>=0} 1/(i^2+1)); A232883 (sum_{i>=0} 1/(2*i^2+1)).

Programs

Formula

Equals 1/(1*2) + 1/(2*4) + 1/(3*6) + 1/(4*8) + ... [Jolley]
Equals -dilogarithm(-1). - Rick L. Shepherd, Jul 21 2004
Equals Sum_{n>=1} ((-1)^(n+1))/n^2 [Clawson]. - Alonso del Arte, Aug 15 2012
Equals Integral_{x=0..1} log((1+x^3)/(1-x^3))/x dx. - Bruno Berselli, May 13 2013
From Jean-François Alcover, May 17 2013: (Start)
Equals zeta(2)/2 = A013661/2.
Equals Integral_{x=1..2} log(x)/(x-1) dx. (End)
Equals lim_{n->infinity} A244583(n)/prime(n)^2. See A244583 for details. - Richard R. Forberg, Jan 04 2015
Equals Sum_{k>=1} H(k)/(k*2^k), where H(k) = A001008(k)/A002805(k) is the k-th harmonic number. - Amiram Eldar, Aug 20 2020
Equals Integral_{0..infinity} x/(exp(x) + 1) dx. See Abramowitz-Stegun, 23.2.8, for s=2, p. 801. - Wolfdieter Lang, Sep 16 2020
Equals lim_{n->infinity} A024916(n)/(n^2). - Omar E. Pol, Dec 15 2021
Integral_{x=0..1} -log(x)/(x+1) dx. - Bernard Schott, Apr 25 2022
Equals 1/2 + Sum_{k>=1} H(k)/(k*(k+1)*(k+2)), where H(k) = A001008(k)/A002805(k) is the k-th harmonic number (Bracken, 2023). - Amiram Eldar, Oct 06 2023
Equals Integral_{x >= 0} x^2/cosh(x)^2 dx. - Peter Bala, Jun 20 2024
Equals 1 + (1/8)*Sum_{k >= 0} (-1)^(k-1) * (10*k + 13)/((k + 1)*(2*k + 1)^2*(2*k + 3)^2*binomial(2*k, k)). See Catalan, Section 35, equation 54. - Peter Bala, Aug 17 2024
Equals Integral_{x=0..oo} ((arctan(x) - Pi/4)*log(x^2 + 1))/(x^2) dx. - Kritsada Moomuang, Jun 04 2025

A046915 Sum of divisors of 10^n.

Original entry on oeis.org

1, 18, 217, 2340, 24211, 246078, 2480437, 24902280, 249511591, 2497558338, 24987792457, 249938963820, 2499694822171, 24998474116998, 249992370597277, 2499961853010960, 24999809265103951, 249999046325618058, 2499995231628286897
Offset: 0

Views

Author

Keywords

Comments

A072692(n) = A049000(n) + a(n).
a(n) is the number of full-dimensional lattices in Z^(n+1) with volume 10. - Álvar Ibeas, Nov 29 2015

Examples

			At 10^1 the factors are 1, 2, 5, 10. The sum of these factors is 18: 1 + 2 + 5 + 10.
		

Crossrefs

Cf. A000203 (sigma(n)), A049000, A072692. 10th row of A160870, shifted.

Programs

  • Magma
    [1/4*(2^(n+1)-1)*(5^(n+1)-1): n in [0..20]]; // Vincenzo Librandi, Oct 03 2011
    
  • Mathematica
    Table[DivisorSigma[1, 10^n], {n, 0, 18}] (* Jayanta Basu, Jun 30 2013 *)
  • PARI
    Vec(-(10*x^2-1)/((x-1)*(2*x-1)*(5*x-1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Jan 27 2015
    
  • PARI
    a(n) = sigma(10^n); \\ Altug Alkan, Dec 04 2015

Formula

a(n) = 1/4*(2^(n+1)-1)*(5^(n+1)-1). E.g., a(1) = 1/4*(2^2-1)*(5^2-1) = 18. - Vladeta Jovovic, Dec 18 2001
a(n) = 18*a(n-1)-97*a(n-2)+180*a(n-3)-100*a(n-4). - Colin Barker, Jan 27 2015
G.f.: -(10*x^2-1) / ((x-1)*(2*x-1)*(5*x-1)*(10*x-1)). - Colin Barker, Jan 27 2015

A049000 Sum of sigma(j) for 1<=j<10^n, where sigma(j) is the sum of divisors of j.

Original entry on oeis.org

0, 69, 8082, 820741, 82231803, 8224494757, 822465638000, 82246686892516, 8224670172682646, 822467031614802290, 82246703327412473943, 8224670334073621455209, 822467033422857645316807, 82246703342395510922780776, 8224670334240978188556405240
Offset: 0

Views

Author

Keywords

Comments

The ratio of successive terms approaches 100.

Examples

			For n=1, the sum of sigma(j) for j<10 is 1+3+4+7+6+12+8+15+13=69, so a(1)=69.
		

Crossrefs

Cf. A072691 (Pi^2/12).
Cf. A072692 (sum for 1<=j<=10^n and other links).

Formula

a(n) = A072692(n) - A046915(n) ~ Pi^2/12 * 10^(2*n). - Amiram Eldar, Feb 16 2020

Extensions

One more term from Rick L. Shepherd, Jul 03 2002
More terms from Amiram Eldar, Feb 16 2020

A136363 a(n) = Sum_{ composite k, 1 <= k <= 10^n} (Sum of divisors d of k with 1 < d < k).

Original entry on oeis.org

23, 3150, 321582, 32241015, 3224590836, 322466618438, 32246696794797, 3224670272194238, 322467032612360629, 32246703337400266401, 3224670334173560419030, 322467033423857340138979, 32246703342405509396897775, 3224670334241078180927002518, 322467033424112509326065894640
Offset: 1

Views

Author

Enoch Haga, Dec 26 2007, Dec 29 2007

Keywords

Examples

			a(1) = 23 because the divisors through 10^1 are as follows: 4 (2); 6 (2,3); 8 (2,4); 9 (3); 10 (2,5). The sum is 2 + 2 + 3 + 2 + 4 + 3 + 2 + 5 = 23.
		

Crossrefs

Formula

a(n) = A072692(n) - 10^n*(10^n+3)/2 + 1. - Max Alekseyev, May 10 2009
a(n) ~ (Pi^2/12 - 1/2) * 10^(2*n). - Amiram Eldar, Aug 05 2024

Extensions

Edited by N. J. A. Sloane, Jan 12 2008
Extended by Max Alekseyev, May 10 2009
a(13)-a(15) from Amiram Eldar, Aug 05 2024

A188138 Sum of sigma_2(k) for 1 <= k <= 10^n, where sigma_2(k) is the sum of the divisors of k squared.

Original entry on oeis.org

1, 469, 407819, 401382971, 400757638164, 400692683389101, 400686363385965077, 400685705322499946270, 400685641565621401132515, 400685635084923815073475174, 400685634458741808360827818508, 400685634393583522561137962683069
Offset: 0

Views

Author

Robert G. Wilson v, Apr 25 2011

Keywords

Comments

a(n) ~ 10^(3n)*zeta(3)/3.

Crossrefs

Cf. A072692.

Programs

  • Mathematica
    k = 1; lst = {}; s = 0; Do[ While[k < 10^n + 1, s = s + DivisorSigma[2, k]; k++]; AppendTo[lst, s], {n, 0, 9}]; lst
    a[n_] := With[{nn=10^n}, Sum[Floor[nn/k]*k^2, {k, nn}]]; Array[a,9,0] (* T. D. Noe, Apr 25 2011 *)

Extensions

a(10)-a(11) from Hiroaki Yamanouchi, Jul 06 2014

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

Original entry on oeis.org

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

Views

Author

Andrew Lelechenko, Apr 15 2011

Keywords

Comments

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

Crossrefs

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

Formula

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

Extensions

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

A321675 a(n) = Sum_{k=1..10^n} k*sigma(k).

Original entry on oeis.org

1, 622, 558275, 549175530, 548429473046, 548320905633448, 548312690631798482, 548311465139943768941, 548311366911386862908968, 548311356554322895313137239, 548311355740964925044531454428, 548311355626818302486560961291870, 548311355617569600726982364186141942
Offset: 0

Views

Author

Daniel Suteu, Nov 16 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Sum[k DivisorSigma[1, k], {k, 10^#}] &, 7, 0] (* Michael De Vlieger, Nov 20 2018 *)
  • PARI
    a(n) = sum(k=1, 10^n, k*sigma(k)); \\ Michel Marcus, Nov 23 2018

Formula

a(n) = A143128(10^n).
a(n) ~ 10^(3*n) * Pi^2 / 18.
Showing 1-8 of 8 results.