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 17 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

A319085 a(n) = Sum_{k=1..n} k^2*tau(k), where tau is A000005.

Original entry on oeis.org

1, 9, 27, 75, 125, 269, 367, 623, 866, 1266, 1508, 2372, 2710, 3494, 4394, 5674, 6252, 8196, 8918, 11318, 13082, 15018, 16076, 20684, 22559, 25263, 28179, 32883, 34565, 41765, 43687, 49831, 54187, 58811, 63711, 75375, 78113, 83889, 89973, 102773, 106135
Offset: 1

Views

Author

Vaclav Kotesovec, Sep 10 2018

Keywords

Comments

In general, for m>=1, Sum_{k=1..n} k^m * tau(k) = Sum_{k=1..n} k^m * (Bernoulli(m+1, floor(1 + n/k)) - Bernoulli(m+1, 0)) / (m+1), where Bernoulli(n,x) are the Bernoulli polynomials. - Daniel Suteu, Nov 08 2018

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[k^2*DivisorSigma[0, k], {k, 1, 50}]]
  • PARI
    a(n) = sum(k=1, n, k^2*numdiv(k)); \\ Michel Marcus, Sep 12 2018
    
  • PARI
    f(n) = n*(n+1)*(2*n+1)/6; \\ A000330
    a(n) = 2*sum(k=1, sqrtint(n), k^2 * f(n\k)) - f(sqrtint(n))^2; \\ Daniel Suteu, Nov 26 2020
    
  • Python
    from math import isqrt
    def A319085(n): return (-((s:=isqrt(n))*(s+1)*(2*s+1))**2//12 + sum(k**2*(q:=n//k)*(q+1)*(2*q+1) for k in range(1,s+1)))//3 # Chai Wah Wu, Oct 21 2023

Formula

a(n) ~ n^3 * (log(n) + 2*gamma - 1/3)/3, where gamma is the Euler-Mascheroni constant A001620.
a(n) = Sum_{k=1..n} k^2 * Bernoulli(3, floor(1 + n/k)) / 3, where Bernoulli(n,x) are the Bernoulli polynomials. - Daniel Suteu, Nov 08 2018
a(n) = Sum_{k=1..n} Sum_{i=1..floor(n/k)} i^2 * k^2. - Wesley Ivan Hurt, Nov 26 2020

A051336 Number of increasing arithmetic progressions in {1,2,3,...,n}, including trivial arithmetic progressions of lengths 1 and 2.

Original entry on oeis.org

1, 3, 7, 13, 22, 33, 48, 65, 86, 110, 138, 168, 204, 242, 284, 330, 381, 434, 493, 554, 621, 692, 767, 844, 929, 1017, 1109, 1205, 1307, 1411, 1523, 1637, 1757, 1881, 2009, 2141, 2282, 2425, 2572, 2723, 2882, 3043, 3212, 3383, 3560, 3743, 3930, 4119
Offset: 1

Views

Author

John W. Layman, Nov 02 1999

Keywords

Comments

The number of arithmetic subsequences of [1, ..., n] with successive-term increment i and length k is (n-i*(k-1))(i > 0, k > 0, n > i*(k-1)). - Robert E. Sawyer (rs.1(AT)mindspring.com)
The best algorithm known for generating a(n) from scratch has order O(sqrt(n)) (see below). If a(n-1) is known, it reduces to O(n^(1/3)). - Daniel Hoying, May 20 2020

Examples

			a(1): [1];
a(2): [1],[2],[1,2];
a(3): [1],[2],[3],[1,2],[1,3],[2,3],[1,2,3].
		

Crossrefs

Cf. A078567.
See A078651 and A366471 for GPs.

Programs

  • Mathematica
    nmax = 48; t = Table[ DivisorSigma[0, n], {n, 1, nmax}]; Accumulate[ Accumulate[t]+1] - Accumulate[t] (* Jean-François Alcover, Nov 08 2011 *)
    With[{c=Accumulate[DivisorSigma[0,Range[50]]]},Accumulate[c+1]-c] (* Harvey P. Dale, Dec 23 2015 *)
    nmax = 50; RecurrenceTable[{a[n] == a[n-1]+1+p[n], p[n] == p[n-1]+DivisorSigma[0, n-1], a[1] == 1, p[1] == 0}, {a, p}, {n, 1, nmax}][[All,1]] (* Daniel Hoying, May 16 2020 *)
  • Python
    from math import isqrt
    def A051336(n): return (((s:=isqrt(n-1))*(s+1))**2>>2)+(1-s**2)*n+sum((q:=(n-1)//k)*(2*n-k*(1+q)) for k in range(1, s+1)) # Chai Wah Wu, Oct 21 2023

Formula

Theorem: the second differences give tau(n+1), the number of divisors of n+1 (A000005).
a(n) = n + A078567(n).
a(n) = n + Sum_{ i=1..n-1, j=1..floor(n/i) } (n - i*j). - Robert E. Sawyer (rs.1(AT)mindspring.com)
From Daniel Hoying, May 15 2020: (Start)
a(n+1) = a(n) + 1 + Sum_{i=1..n} tau(i).
= a(n) + 1 + A006218(n+1).
a(n+1) = (n + 1)*(1 + Sum_{i=1..n} floor(n/i)) - Sum_{i=1..n} i*tau(i).
= (n + 1)*(1 + A006218(n)) - A143127(n). (End)

A083356 Total area of all incongruent integer-sided rectangles of area <= n.

Original entry on oeis.org

0, 1, 3, 6, 14, 19, 31, 38, 54, 72, 92, 103, 139, 152, 180, 210, 258, 275, 329, 348, 408, 450, 494, 517, 613, 663, 715, 769, 853, 882, 1002, 1033, 1129, 1195, 1263, 1333, 1513, 1550, 1626, 1704, 1864, 1905, 2073, 2116, 2248, 2383, 2475, 2522, 2762, 2860
Offset: 0

Views

Author

Dean Hickerson, Apr 26 2003

Keywords

Examples

			a(5)=19, the rectangles being 1 X 1, 1 X 2, 1 X 3, 1 X 4, 1 X 5 and 2 X 2.
		

Crossrefs

Partial sums of A060872.

Programs

  • Mathematica
    a[n_] := Sum[r(r+Floor[n/r])(Floor[n/r]+1-r), {r, 1, Floor[Sqrt[n]]}]/2
  • Python
    from math import isqrt
    def A083356(n): return (k:=isqrt(n))*(k+1)*(2+4*k-3*k*(k+1))//24+sum(i*(m:=n//i)*(1+m)>>1 for i in range(1,k+1)) # Chai Wah Wu, Jul 11 2023

Formula

a(n) = Sum_{k=1..n} k*ceiling(d(k)/2), where d(k)=A000005(k) is the number of divisors of k.
a(n) = Sum_{r=1..floor(sqrt(n))} r*(r+floor(n/r))*(floor(n/r)+1-r)/2.
a(n) = ( A143127(n) + A000330(floor(sqrt(n))) ) / 2. - Max Alekseyev, Jan 31 2012
a(n) ~ n^2 * log(n) / 4
G.f.: x*f'(x)/(1 - x), where f(x) = Sum_{k>=1} x^k^2/(1 - x^k). - Ilya Gutkovskiy, Apr 12 2017

A320895 a(n) = Sum_{k=1..n} k^3 * tau(k), where tau is A000005.

Original entry on oeis.org

1, 17, 71, 263, 513, 1377, 2063, 4111, 6298, 10298, 12960, 23328, 27722, 38698, 52198, 72678, 82504, 117496, 131214, 179214, 216258, 258850, 283184, 393776, 440651, 510955, 589687, 721399, 770177, 986177, 1045759, 1242367, 1386115, 1543331, 1714831, 2134735
Offset: 1

Views

Author

Vaclav Kotesovec, Oct 23 2018

Keywords

Comments

In general, for m>=0, Sum_{k=1..n} k^m * tau(k) ~ n^(m+1) * ((log(n) + 2*gamma)/(m+1) - 1/(m+1)^2), where gamma is the Euler-Mascheroni constant A001620.

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[k^3*DivisorSigma[0, k], {k, 1, 50}]]
  • PARI
    a(n) = sum(k=1, n, k^3*numdiv(k)); \\ Michel Marcus, Oct 23 2018

Formula

a(n) ~ n^4 * (log(n) + 2*gamma - 1/4)/4, where gamma is the Euler-Mascheroni constant A001620.
a(n) = Sum_{k=1..n} (k^3 / 4) * floor(n/k)^2 * floor(1 + n/k)^2. - Daniel Suteu, Nov 07 2018

A318755 a(n) = Sum_{k=1..n} tau(k)^3, where tau is A000005.

Original entry on oeis.org

1, 9, 17, 44, 52, 116, 124, 188, 215, 279, 287, 503, 511, 575, 639, 764, 772, 988, 996, 1212, 1276, 1340, 1348, 1860, 1887, 1951, 2015, 2231, 2239, 2751, 2759, 2975, 3039, 3103, 3167, 3896, 3904, 3968, 4032, 4544, 4552, 5064, 5072, 5288, 5504, 5568, 5576
Offset: 1

Views

Author

Vaclav Kotesovec, Sep 02 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[DivisorSigma[0, Range[50]]^3]
  • PARI
    a(n) = sum(k=1, n, numdiv(k)^3); \\ Michel Marcus, Sep 03 2018

Formula

a(n) ~ n * (A1*log(n)^7 + A2*log(n)^6 + A3*log(n)^5 + A4*log(n)^4 + A5*log(n)^3 + A6*log(n)^2 + A7*log(n) + A8) [Ramanujan, 1916, formula (8)].
From Vaclav Kotesovec, Mar 12 2023: (Start)
Let f(s) = Product_{p prime} (1 - 9/p^(2*s) + 16/p^(3*s) - 9/p^(4*s) + 1/p^(6*s)), then
A1 = f(1)/5040 = 0.0000097860463451190658257888710490039661018239924009134296302566263529129...
A2 = ((8*gamma - 1)*f(1) + f'(1)) / 720 = 0.0007019997226174095261771358653540021199703406583347258622085873074052900...
A3 = (2 * f(1) * (1 - 8*gamma + 28*gamma^2 - 8*sg1) + 2*(8*gamma - 1)*f'(1) + f''(1)) / 240 = 0.0171707557268638504150726777646428533953516776541779590118582753709080243...
A4 = (6*f(1)*(-1 - 28*gamma^2 + 56*gamma^3 + gamma*(8 - 56*sg1) + 8*sg1 + 4*sg2) + 6*(1 - 8*gamma + 28*gamma^2 - 8*sg1)*f'(1) + (24*gamma - 3)*f''(1) + f'''(1)) / 144 = 0.1758477246705824231478998937203303065702508974398264386862202155788...,
where f(1) = Product_{p prime} (1 - 9/p^2 + 16/p^3 - 9/p^4 + 1/p^6) = 0.0493216735794000917619759100869799891531929217006036853364933968186814900...,
f'(1) = f(1) * Sum_{p prime} 6*(3*p + 1) * log(p) / ((p-1) * (p^2 + 4*p + 1)) = 0.3270075329904166293296173488834535949530448497141635531152019426434776932...,
f''(1) = f'(1)^2 / f(1) + f(1) * Sum_{p prime} -36 * p^2 * (p+1)^2 * log(p)^2 / ((p-1)^2 * (p^2 + 4*p + 1)^2) = 1.1340946589859924227356699847227569935993284591079455746283572890834872890...,
f'''(1) = 3*f'(1)*f''(1)/f(1) - 2*f'(1)^3/f(1)^2 + f(1) * Sum_{p prime} 72*p^2 * (p^5 + 3*p^4 + 8*p^3 + 8*p^2 + 3*p+ 1) * log(p)^3 / ((p-1)^3 * (p^2+ 4*p + 1)^3) = -1.3447542210274297874241826540796632006263184659735145444999327537246287...,
gamma is the Euler-Mascheroni constant A001620 and sg1, sg2 are the Stieltjes constants, see A082633 and A086279.
Approximate values of other constants:
A5 = 0.7626157870664479996781152281270580148665443022014605423466363134512...
A6 = 1.3720912878905940866975369743071441424192833481004753922122458993040...
A7 = 1.1416118168318711437057727816148048057614284471759625288073915723140...
A8 = 0.2618221765943171424958051160111945242076019991649774700610674747694...
(End)

A106846 a(n) = Sum_{k + l*m <= n} (k + l*m), with 0 <= k,l,m <= n.

Original entry on oeis.org

0, 4, 22, 64, 144, 269, 461, 720, 1072, 1522, 2092, 2774, 3626, 4614, 5776, 7126, 8694, 10445, 12461, 14684, 17204, 19997, 23077, 26412, 30156, 34206, 38600, 43352, 48532, 54042, 60072, 66458, 73338, 80664, 88450, 96710, 105638, 114999
Offset: 0

Views

Author

Ralf Stephan, May 06 2005

Keywords

Crossrefs

Programs

  • Maple
    A106846 := proc(n)
        local a,k,l,m ;
        a := 0 ;
        for k from 0 to n do
            for l from 0 to n do
                if l = 0 then
                    m := n ;
                else
                    m := floor((n-k)/l) ;
                end if;
                if m >=0 then
                    m := min(m,n) ;
                    a := a+(m+1)*k+l*m*(m+1)/2 ;
                end if;
            end do:
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 17 2012
  • Mathematica
    A106846[n_] := Module[{a, k, l, m }, a = 0; For[k = 0, k <= n, k++, For[l = 0, l <= n, l++, If[l == 0, m = n, m = Floor[(n - k)/l]]; If[m >= 0, m = Min[m, n]; a = a + (m + 1)*k + l*m*(m + 1)/2 ]]]; a];
    Table[A106846[n], {n, 0, 40}] (* Jean-François Alcover, Apr 04 2024, after R. J. Mathar *)

Formula

From Ridouane Oudra, Jun 24 2024: (Start)
a(n) = (1/2) * (n*(n+1)*(2*n+1) + Sum_{k=1..n} (n^2 + n + k - k^2) * tau(k)).
a(n) = (1/2) * (A055112(n) + (n^2 + n) * A006218(n) + A143127(n) - A319085(n)).
a(n) = A059270(n) + A143127(n) + A106847(n). (End)

A106847 a(n) = Sum {k + j*m <= n} (k + j*m), with 0 < k,j,m <= n.

Original entry on oeis.org

0, 0, 2, 11, 31, 71, 131, 229, 357, 537, 767, 1064, 1412, 1867, 2385, 3000, 3720, 4570, 5506, 6608, 7808, 9194, 10734, 12436, 14260, 16360, 18622, 21079, 23739, 26668, 29758, 33199, 36815, 40742, 44924, 49369, 54085, 59265, 64661, 70355
Offset: 0

Views

Author

Ralf Stephan, May 06 2005

Keywords

Examples

			We have 1+1*1=2<=3, 1+2*1=3, 1+1*2=3, 2+1*1=3, thus a(3)=2+3+3+3=11.
		

Crossrefs

Cf. A106633, A106634, A106846, A078567 (number of terms).

Programs

  • Maple
    A106847 := proc(n)
        local a,k,l,m ;
        a := 0 ;
        for k from 1 to n do
            for l from 1 to n-k do
                m := floor((n-k)/l) ;
                if m >=1 then
                    m := min(m,n) ;
                    a := a+m*k+l*m*(m+1)/2 ;
                end if;
            end do:
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 17 2012
  • Mathematica
    A106847[n_] := Module[{a, k, l, m}, a = 0; For[k = 1, k <= n, k++, For[l = 1, l <= n - k, l++, If[l == 0, m = n, m = Floor[(n - k)/l]]; If[m >= 1, m = Min[m, n]; a = a + m*k + l*m*(m + 1)/2]]]; a];
    Table[A106847[n], {n, 0, 40}] (* Jean-François Alcover, Apr 04 2024, after R. J. Mathar *)
  • PARI
    A106847(n)=sum(m=1,n-1,sum(k=1,(n-1)\m,(n-m*k)*(n+m*k+1)))/2  \\ M. F. Hasler, Oct 17 2012

Formula

From Ridouane Oudra, Jun 02 2024: (Start)
a(n) = (1/2)*Sum_{k=1..n} (n^2 + n - k^2 - k)*tau(k);
a(n) = (1/2)*(n^2 + n)*A006218(n) - Sum_{k=1..n} A143272(k);
a(n) = (1/2)*((n + 1)*A143274(n) - A143127(n) - A319085(n)). (End)
a(n) ~ n^3 * (log(n) + 2*gamma - 4/3)/3, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jun 15 2024

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

Original entry on oeis.org

1, 6, 14, 31, 45, 81, 101, 150, 191, 253, 285, 401, 439, 527, 623, 752, 802, 979, 1035, 1233, 1369, 1509, 1577, 1901, 2020, 2186, 2362, 2642, 2728, 3136, 3228, 3549, 3765, 3983, 4215, 4772, 4882, 5126, 5382, 5932, 6054, 6630, 6758, 7202, 7664, 7960, 8100, 8936
Offset: 1

Views

Author

Seiichi Manyama, Dec 14 2021

Keywords

Crossrefs

Column 2 of A350106.

Programs

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

Formula

a(n) = Sum_{k=1..n} k * Sum_{d|k} (2*d - 1)/d = 2 * A143127(n) - A024916(n).
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k/(1 - x^k)^2.
a(n) = Sum_{k=1..n} 2 * k * tau(k) - sigma(k).

A356124 Square array T(n,k), n >= 1, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=1..n} j^k * binomial(floor(n/j)+1,2).

Original entry on oeis.org

1, 1, 4, 1, 5, 8, 1, 7, 11, 15, 1, 11, 19, 23, 21, 1, 19, 41, 47, 33, 33, 1, 35, 103, 125, 77, 57, 41, 1, 67, 281, 395, 255, 149, 71, 56, 1, 131, 799, 1373, 1025, 555, 205, 103, 69, 1, 259, 2321, 5027, 4503, 2537, 905, 325, 130, 87, 1, 515, 6823, 18965, 20657, 12867, 4945, 1585, 442, 170, 99
Offset: 1

Views

Author

Seiichi Manyama, Jul 27 2022

Keywords

Examples

			Square array begins:
   1,  1,   1,   1,    1,     1,     1, ...
   4,  5,   7,  11,   19,    35,    67, ...
   8, 11,  19,  41,  103,   281,   799, ...
  15, 23,  47, 125,  395,  1373,  5027, ...
  21, 33,  77, 255, 1025,  4503, 20657, ...
  33, 57, 149, 555, 2537, 12867, 68969, ...
		

Crossrefs

Column k=0..4 give A024916, A143127, A143128, A356125, A356126.
T(n,n) gives A356129.
T(n,n+1) gives A356128.

Programs

  • Mathematica
    T[n_, k_] := Sum[j^k * Binomial[Floor[n/j] + 1, 2], {j, 1, n}]; Table[T[k, n - k], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, Jul 28 2022 *)
  • PARI
    T(n, k) = sum(j=1, n, j^k*binomial(n\j+1, 2));
    
  • PARI
    T(n, k) = sum(j=1, n, j*sigma(j, k-1));
    
  • Python
    from itertools import count, islice
    from math import isqrt
    from sympy import bernoulli
    def A356124_T(n,k): return ((s:=isqrt(n))*(s+1)*(bernoulli(k+1)-bernoulli(k+1,s+1))+sum(w**k*(k+1)*((q:=n//w)*(q+1))+(w*(bernoulli(k+1,q+1)-bernoulli(k+1))<<1) for w in range(1,s+1)))//(k+1)>>1
    def A356124_gen(): # generator of terms
         return (A356124_T(k+1,n-k-1) for n in count(1) for k in range(n))
    A356124_list = list(islice(A356124_gen(),30)) # Chai Wah Wu, Oct 24 2023

Formula

G.f. of column k: (1/(1-x)) * Sum_{j>=1} j^k * x^j/(1 - x^j)^2.
T(n,k) = Sum_{j=1..n} j * sigma_{k-1}(j).
Showing 1-10 of 17 results. Next