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

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

A129235 a(n) = 2*sigma(n) - tau(n), where tau(n) is the number of divisors of n (A000005) and sigma(n) is the sum of divisors of n (A000203).

Original entry on oeis.org

1, 4, 6, 11, 10, 20, 14, 26, 23, 32, 22, 50, 26, 44, 44, 57, 34, 72, 38, 78, 60, 68, 46, 112, 59, 80, 76, 106, 58, 136, 62, 120, 92, 104, 92, 173, 74, 116, 108, 172, 82, 184, 86, 162, 150, 140, 94, 238, 111, 180, 140, 190, 106, 232, 140, 232, 156, 176, 118, 324, 122, 188
Offset: 1

Views

Author

Gary W. Adamson, Apr 05 2007

Keywords

Comments

Row sums of A129234. - Emeric Deutsch, Apr 17 2007
Equals row sums of A130307. - Gary W. Adamson, May 20 2007
Equals row sums of triangle A143315. - Gary W. Adamson, Aug 06 2008
Equals A051731 * (1, 3, 5, 7, ...); i.e., the inverse Mobius transform of the odd numbers. Example: a(4) = 11 = (1, 1, 0, 1) * (1, 3, 5, 7) = (1 + 3 + 0 + 7), where (1, 1, 0, 1) = row 4 of A051731. - Gary W. Adamson, Aug 17 2008
Equals row sums of triangle A143594. - Gary W. Adamson, Aug 26 2008

Examples

			a(4) = 2*sigma(4) - tau(4) = 2*7 - 3 = 11.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(2*sigma(n)-tau(n),n=1..75); # Emeric Deutsch, Apr 17 2007
    G:=sum(z^k*(k-(k-1)*z^k)/(1-z^k)^2,k=1..100): Gser:=series(G,z=0,80): seq(coeff(Gser,z,n),n=1..75); # Emeric Deutsch, Apr 17 2007
  • Mathematica
    a[n_] := DivisorSum[2n, If[EvenQ[#], #-1, 0]&]; Array[a, 70] (* Jean-François Alcover, Dec 06 2015, adapted from PARI *)
    Table[2*DivisorSigma[1,n]-DivisorSigma[0,n],{n,80}] (* Harvey P. Dale, Aug 07 2022 *)
  • PARI
    a(n)=sumdiv(2*n,d, if(d%2==0, d-1, 0 ) ); /* Joerg Arndt, Oct 07 2012 */
    
  • PARI
    a(n) = 2*sigma(n)-numdiv(n); \\ Altug Alkan, Mar 18 2018

Formula

G.f.: Sum_{k>=1} z^k*(k-(k-1)*z^k)/(1-z^k)^2. - Emeric Deutsch, Apr 17 2007
G.f.: Sum_{n>=1} x^n*(1+x^n)/(1-x^n)^2. - Joerg Arndt, May 25 2011
L.g.f.: -log(Product_{k>=1} (1 - x^k)^(2-1/k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Mar 18 2018
a(n) = A222548(n) - A222548(n-1). - Ridouane Oudra, Jul 11 2020

Extensions

Edited by Emeric Deutsch, Apr 17 2007

A318742 a(n) = Sum_{k=1..n} floor(n/k)^3.

Original entry on oeis.org

1, 9, 29, 74, 136, 254, 382, 596, 833, 1173, 1505, 2057, 2527, 3209, 3921, 4856, 5674, 6928, 7956, 9474, 10882, 12608, 14128, 16506, 18369, 20797, 23141, 26129, 28567, 32259, 35051, 38963, 42483, 46675, 50435, 55904, 59902, 65156, 70092, 76460
Offset: 1

Views

Author

Vaclav Kotesovec, Sep 02 2018

Keywords

Crossrefs

Programs

  • Magma
    [&+[Floor(n/k)^3:k in [1..n]]: n in [1..40]]; // Marius A. Burtea, Jul 16 2019
    
  • Mathematica
    Table[Sum[Floor[n/k]^3, {k, 1, n}], {n, 1, 40}]
    Accumulate[Table[DivisorSigma[0, k] - 3*DivisorSigma[1, k] + 3*DivisorSigma[2, k], {k, 1, 40}]]
  • PARI
    a(n) = sum(k=1, n, (n\k)^3); \\ Michel Marcus, Sep 03 2018
    
  • Python
    from math import isqrt
    def A318742(n): return -(s:=isqrt(n))**4 + sum((q:=n//k)*(3*k*(k-1)+q**2+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 21 2023

Formula

a(n) = A006218(n) - 3*A024916(n) + 3*A064602(n).
a(n) ~ zeta(3) * n^3.
G.f.: (1/(1 - x)) * Sum_{k>=1} (3*k*(k - 1) + 1) * x^k/(1 - x^k). - Ilya Gutkovskiy, Jul 16 2019

A243980 Four times the sum of all divisors of all positive integers <= n.

Original entry on oeis.org

4, 16, 32, 60, 84, 132, 164, 224, 276, 348, 396, 508, 564, 660, 756, 880, 952, 1108, 1188, 1356, 1484, 1628, 1724, 1964, 2088, 2256, 2416, 2640, 2760, 3048, 3176, 3428, 3620, 3836, 4028, 4392, 4544, 4784, 5008, 5368, 5536, 5920, 6096, 6432, 6744, 7032, 7224, 7720
Offset: 1

Views

Author

Omar E. Pol, Jun 18 2014

Keywords

Comments

Also number of "ON" cells at n-th stage in a structure which looks like a simple 2-dimensional cellular automaton (see example). The structure is formed by the reflection on the four quadrants from the diagram of the symmetry of sigma in the first quadrant after n-th stage, hence the area in each quadrant equals the area of each wedge and equals A024916(n); the sum of all divisors of all positive integers <= n. For more information about the diagram see A237593 and A237270.

Examples

			Illustration of the structure after 16 stages (contains 880 ON cells):
.                 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.                |  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.             _ _| |  _ _ _ _ _ _ _ _ _ _ _ _ _ _  | |_ _
.           _|  _ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _  |_
.         _|  _|  _| |  _ _ _ _ _ _ _ _ _ _ _ _  | |_  |_  |_
.        |  _|   |_ _| |_ _ _ _ _ _ _ _ _ _ _ _| |_ _|   |_  |
.   _ _ _| |  _ _|     |  _ _ _ _ _ _ _ _ _ _  |     |_ _  | |_ _ _
.  |  _ _ _|_| |      _| |_ _ _ _ _ _ _ _ _ _| |_      | |_|_ _ _  |
.  | | |  _ _ _|    _|_ _|  _ _ _ _ _ _ _ _  |_ _|_    |_ _ _  | | |
.  | | | | |  _ _ _| |  _| |_ _ _ _ _ _ _ _| |_  | |_ _ _  | | | | |
.  | | | | | | |  _ _|_|  _|  _ _ _ _ _ _  |_  |_|_ _  | | | | | | |
.  | | | | | | | | |  _ _|   |_ _ _ _ _ _|   |_ _  | | | | | | | | |
.  | | | | | | | | | | |  _ _|  _ _ _ _  |_ _  | | | | | | | | | | |
.  | | | | | | | | | | | | |  _|_ _ _ _|_  | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | |  _ _  | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | | |   | | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | | |_ _| | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | |_|_ _ _ _|_| | | | | | | | | | | | | |
.  | | | | | | | | | | | |_|_  |_ _ _ _|  _|_| | | | | | | | | | | |
.  | | | | | | | | | |_|_    |_ _ _ _ _ _|    _|_| | | | | | | | | |
.  | | | | | | | |_|_ _  |_  |_ _ _ _ _ _|  _|  _ _|_| | | | | | | |
.  | | | | | |_|_ _  | |_  |_ _ _ _ _ _ _ _|  _| |  _ _|_| | | | | |
.  | | | |_|_ _    |_|_ _| |_ _ _ _ _ _ _ _| |_ _|_|    _ _|_| | | |
.  | |_|_ _ _  |     |_  |_ _ _ _ _ _ _ _ _ _|  _|     |  _ _ _|_| |
.  |_ _ _  | |_|_      | |_ _ _ _ _ _ _ _ _ _| |      _|_| |  _ _ _|
.        | |_    |_ _  |_ _ _ _ _ _ _ _ _ _ _ _|  _ _|    _| |
.        |_  |_  |_  | |_ _ _ _ _ _ _ _ _ _ _ _| |  _|  _|  _|
.          |_  |_ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _|  _|
.            |_ _  | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |  _ _|
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.                |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[4*DivisorSigma[1,Range[50]]] (* Harvey P. Dale, May 13 2018 *)
  • Python
    from math import isqrt
    def A243980(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

Formula

a(n) = A016742(n) - 4*A004125(n) = 4*A024916(n).
a(n) = 2*(A006218(n) + A222548(n)) = 2*A327329(n). - Omar E. Pol, Sep 25 2019

A332469 a(n) = Sum_{k=1..n} floor(n/k)^n.

Original entry on oeis.org

1, 5, 29, 274, 3160, 47452, 825862, 16843268, 387702833, 10009826727, 285360679985, 8918294547447, 302888236005847, 11112685321898449, 437898668488710801, 18447025705612363530, 827242514466399305122, 39346558271561286347116, 1978421007121668206129316
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 13 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[Floor(n/k)^n:k in [1..n]]:n in [1..20]]; // Marius A. Burtea, Feb 13 2020
    
  • Mathematica
    Table[Sum[Floor[n/k]^n, {k, 1, n}], {n, 1, 19}]
    Table[SeriesCoefficient[1/(1 - x) Sum[(k^n - (k - 1)^n) x^k/(1 - x^k), {k, 1, n}], {x, 0, n}], {n, 1, 19}]
  • PARI
    a(n)={sum(k=1, n, floor(n/k)^n)} \\ Andrew Howroyd, Feb 13 2020
    
  • Python
    from math import isqrt
    def A332469(n): return -(s:=isqrt(n))**(n+1)+sum((q:=n//k)*(k**n-(k-1)**n+q**(n-1)) for k in range(1,s+1)) # Chai Wah Wu, Oct 26 2023

Formula

a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} (k^n - (k - 1)^n) * x^k / (1 - x^k).
a(n) ~ n^n. - Vaclav Kotesovec, Jun 11 2021

A327329 Twice the sum of all divisors of all positive integers <= n.

Original entry on oeis.org

2, 8, 16, 30, 42, 66, 82, 112, 138, 174, 198, 254, 282, 330, 378, 440, 476, 554, 594, 678, 742, 814, 862, 982, 1044, 1128, 1208, 1320, 1380, 1524, 1588, 1714, 1810, 1918, 2014, 2196, 2272, 2392, 2504, 2684, 2768, 2960, 3048, 3216, 3372, 3516, 3612, 3860, 3974, 4160, 4304, 4500, 4608, 4848, 4992
Offset: 1

Views

Author

Omar E. Pol, Sep 25 2019

Keywords

Comments

a(n) has a symmetric representation. Using two opposite quadrants, where in each quadrant there is the Dyck path related to partitions described in the n-th row of triangle A237593, a(n) is the total area (or the total number of cells) of the structure (see the example).
a(n) is also the total area of the horizontal faces in the stepped pyramid with n levels described in A245092 (that is the total area of the terraces plus the area of the base). - Omar E. Pol, Dec 15 2021

Examples

			Illustration of a(8) = 112 using a symmetric structure constructed with the Dyck path related to partitions described in the 8th row of triangle A237593.
                           _ _ _ _ _
                          |         |
                          |         |_
                          |           |_ _
                          |               |
                          |     56        |
                          |               |
                          |               |
           _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _|
          |               |
          |               |
          |               |
          |       56      |
          |_ _            |
              |_          |
                |         |
                |_ _ _ _ _|
		

Crossrefs

Programs

  • Mathematica
    Accumulate[2*DivisorSigma[1,Range[60]]] (* Harvey P. Dale, Sep 25 2021 *)
  • PARI
    a(n) = 2*sum(k=1, n, sigma(k)); \\ Michel Marcus, Dec 20 2021
    
  • Python
    from sympy import divisor_sigma
    from itertools import accumulate
    def f(, n): return  + 2*divisor_sigma(n, 1)
    def aupton(terms): return list(accumulate(range(terms+1), f))[1:]
    print(aupton(55)) # Michael S. Branicky, Dec 16 2021
    
  • Python
    from math import isqrt
    def A327329(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 22 2023

Formula

a(n) = 2*A024916(n).
a(n) = A243980(n)/2.
a(n) = A006218(n) + A222548(n).
a(n) = A001105(n) - A067436(n).
lim_{n->infinity} a(n)/(n^2) = Pi^2/6 = zeta(2) (cf. A013661). - Omar E. Pol, Dec 16 2021

A049792 a(n) = Sum_{k=1..n} floor(n/floor(n/k)).

Original entry on oeis.org

1, 3, 7, 11, 18, 24, 34, 43, 55, 66, 82, 94, 113, 129, 150, 167, 192, 211, 239, 261, 290, 315, 349, 374, 410, 440, 478, 509, 552, 583, 629, 665, 711, 750, 802, 838, 893, 937, 992, 1036, 1097, 1141, 1205, 1255, 1317, 1370, 1440
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    List([1..60], n-> Sum([1..n], j-> Int(n/Int(n/j)) )); # G. C. Greubel, Dec 10 2019
  • Magma
    [(&+[Floor(n/Floor(n/j)): j in [1..n]]): n in [1..60]]; // G. C. Greubel, Dec 10 2019
    
  • Maple
    seq( add(floor(n/floor(n/j)), j=1..n), n=1..60); # G. C. Greubel, Dec 10 2019
  • Mathematica
    Table[Total[Table[Quotient[n, Quotient[n, k]], {k, n}]], {n, 47}] (* Ivan Neretin, Jul 29 2015 *)
  • PARI
    a(n) = sum(j=1,n, n\(n\j));
    vector(60, n, a(n) ) \\ G. C. Greubel, Dec 10 2019
    
  • Sage
    [sum(floor(n/floor(n/j)) for j in (1..n)) for n in (1..60)] # G. C. Greubel, Dec 10 2019
    

Formula

a(n) = A049790(n, n).
a(n) = A222548(n) - Sum_{i=1..n} floor(n/i)*floor(n/(i+1)). - Ridouane Oudra, Jun 22 2020
a(n) ~ (zeta(2) - 1) * n^2. - Vaclav Kotesovec, May 28 2021

A318743 a(n) = Sum_{k=1..n} floor(n/k)^4.

Original entry on oeis.org

1, 17, 83, 274, 644, 1396, 2502, 4388, 6919, 10743, 15385, 22407, 30233, 41209, 53853, 70650, 88636, 113308, 138654, 172332, 207984, 252416, 298002, 358654, 417873, 492065, 569061, 663427, 756053, 875541, 989063, 1130915, 1272967, 1441383, 1607147, 1817080
Offset: 1

Views

Author

Vaclav Kotesovec, Sep 02 2018

Keywords

Crossrefs

Programs

  • Magma
    [&+[Floor(n/k)^4:k in [1..n]]:n in [1..36]]; // Marius A. Burtea, Jul 16 2019
    
  • Mathematica
    Table[Sum[Floor[n/k]^4, {k, 1, n}], {n, 1, 40}]
    Accumulate[Table[-DivisorSigma[0, k] + 4*DivisorSigma[1, k] - 6*DivisorSigma[2, k] + 4*DivisorSigma[3, k], {k, 1, 40}]]
  • PARI
    a(n) = sum(k=1, n, (n\k)^4); \\ Michel Marcus, Sep 03 2018
    
  • Python
    from math import isqrt
    def A318743(n): return -(s:=isqrt(n))**5+sum((q:=n//k)*(k**4-(k-1)**4+q**3) for k in range(1,s+1)) # Chai Wah Wu, Oct 26 2023

Formula

a(n) = -A006218(n) + 4*A024916(n) - 6*A064602(n) + 4*A064603(n).
a(n) ~ zeta(4) * n^4.
a(n) ~ Pi^4 * n^4 / 90.
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * (2*k^2 - 2*k + 1) * x^k/(1 - x^k). - Ilya Gutkovskiy, Jul 16 2019

A318744 a(n) = Sum_{k=1..n} floor(n/k)^5.

Original entry on oeis.org

1, 33, 245, 1058, 3160, 8054, 17086, 33860, 60353, 103437, 164489, 257945, 380407, 556001, 779865, 1085840, 1457122, 1958008, 2544540, 3312306, 4205650, 5336264, 6618976, 8254674, 10059777, 12298021, 14792045, 17829881, 21130663, 25189011, 29518163, 34749419
Offset: 1

Views

Author

Vaclav Kotesovec, Sep 02 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[n/k]^5, {k, 1, n}], {n, 1, 40}]
    Accumulate[Table[DivisorSigma[0, k] - 5*DivisorSigma[1, k] + 10*DivisorSigma[2, k] - 10*DivisorSigma[3, k] + 5*DivisorSigma[4, k], {k, 1, 40}]]
  • PARI
    a(n) = sum(k=1, n, (n\k)^5); \\ Michel Marcus, Sep 03 2018
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (k^5-(k-1)^5)*x^k/(1-x^k))/(1-x)) \\ Seiichi Manyama, May 27 2021
    
  • Python
    from math import isqrt
    def A318744(n): return -(s:=isqrt(n))**6+sum((q:=n//k)*(k**5-(k-1)**5+q**4) for k in range(1,s+1)) # Chai Wah Wu, Oct 26 2023

Formula

a(n) = A006218(n) - 5*A024916(n) + 10*A064602(n) - 10*A064603(n) + 5*A064604(n).
a(n) ~ zeta(5) * n^5.

A350123 a(n) = Sum_{k=1..n} k^2 * floor(n/k)^2.

Original entry on oeis.org

1, 8, 22, 57, 91, 185, 247, 402, 545, 775, 917, 1379, 1573, 1995, 2455, 3106, 3428, 4377, 4775, 5909, 6753, 7727, 8301, 10331, 11230, 12564, 13904, 15990, 16888, 19908, 20930, 23597, 25545, 27767, 29827, 34468, 35910, 38660, 41328, 46318, 48080, 53644, 55578
Offset: 1

Views

Author

Seiichi Manyama, Dec 15 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[2*k*DivisorSigma[1, k] - DivisorSigma[2, k], {k, 1, 50}]] (* Vaclav Kotesovec, Dec 16 2021 *)
  • PARI
    a(n) = sum(k=1, n, k^2*(n\k)^2);
    
  • PARI
    a(n) = sum(k=1, n, k^2*sumdiv(k, d, (2*d-1)/d^2));
    
  • PARI
    a(n) = sum(k=1, n, 2*k*sigma(k)-sigma(k, 2));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (2*k-1)*x^k*(1+x^k)/(1-x^k)^3)/(1-x))
    
  • Python
    from math import isqrt
    def A350123(n): return (-(s:=isqrt(n))**3*(s+1)*((s<<1)+1)+sum((q:=n//k)*(6*k**2*q+((k<<1)-1)*(q+1)*((q<<1)+1)) for k in range(1,s+1)))//6 # Chai Wah Wu, Oct 24 2023

Formula

a(n) = Sum_{k=1..n} k^2 * Sum_{d|k} (2*d - 1)/d^2 = Sum_{k=1..n} 2 * k * sigma(k) - sigma_2(k) = 2 * A143128(n) - A064602(n).
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k * (1 + x^k)/(1 - x^k)^3.
a(n) ~ n^3 * (Pi^2/9 - zeta(3)/3). - Vaclav Kotesovec, Dec 16 2021
Showing 1-10 of 18 results. Next