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
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
- 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.
- T. D. Noe, Table of n, a(n) for n = 1..1000
- J. Bourgain, S. V. Konyagin and I. E. Shparlinski, Product sets of rationals, multiplicative translates of subgroups in residue rings and fixed points of the discrete logarithms, Int. Math. Res. Notices, 2008 (2008), Art. ID rnn 090, 1-29.
- Jean Bourgain, Sergei Konyagin and Igor Shparlinski. Distribution on elements of cosets of small subgroups and applications, arXiv:1103.0567 [math.NT], Mar 2 2011.
- Mikhail R. Gabdullin and Vitalii V. Iudelevich, Numbers of the form kf(k), arXiv:2201.09287 [math.NT] (2022).
- Passawan Noppakaew and Prapanpong Pongsriiam, Product of Some Polynomials and Arithmetic Functions, J. Int. Seq. (2023) Vol. 26, Art. 23.9.1.
- Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 147. [Broken link?]
- Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 147.
-
a038040 n = a000005 n * n -- Reinhard Zumkeller, Jan 21 2014
-
with(numtheory): A038040 := n->tau(n)*n;
-
a[n_] := DivisorSigma[0, n]*n; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Sep 03 2012 *)
-
n*numlib::tau (n)$ n=1..90 // Zerinvary Lajos, May 13 2008
-
a(n)=if(n<1,0,direuler(p=2,n,1/(1-p*X)^2)[n])
-
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 */
-
a(n) = n*numdiv(n); \\ Michel Marcus, Oct 24 2020
-
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
-
[n*sigma(n,0) for n in range(1, 60)] # Stefano Spezia, Jul 20 2025
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
-
Accumulate[Table[k^2*DivisorSigma[0, k], {k, 1, 50}]]
-
a(n) = sum(k=1, n, k^2*numdiv(k)); \\ Michel Marcus, Sep 12 2018
-
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
-
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
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
a(1): [1];
a(2): [1],[2],[1,2];
a(3): [1],[2],[3],[1,2],[1,3],[2,3],[1,2,3].
-
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 *)
-
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
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
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.
- Nick MacKinnon, Problem 10883, Amer. Math. Monthly, 108 (2001) 565; solution by John C. Cock, 110 (2003) 343-344.
-
a[n_] := Sum[r(r+Floor[n/r])(Floor[n/r]+1-r), {r, 1, Floor[Sqrt[n]]}]/2
-
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
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
-
Accumulate[Table[k^3*DivisorSigma[0, k], {k, 1, 50}]]
-
a(n) = sum(k=1, n, k^3*numdiv(k)); \\ Michel Marcus, Oct 23 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
-
Accumulate[DivisorSigma[0, Range[50]]^3]
-
a(n) = sum(k=1, n, numdiv(k)^3); \\ Michel Marcus, Sep 03 2018
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
-
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
-
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 *)
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
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.
-
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
-
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 *)
-
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
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
-
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 *)
-
a(n) = sum(k=1, n, k*(n\k)^2);
-
a(n) = sum(k=1, n, k*sumdiv(k, d, (2*d-1)/d));
-
my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (2*k-1)*x^k/(1-x^k)^2)/(1-x))
-
a(n) = sum(k=1, n, 2*k*numdiv(k)-sigma(k));
-
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
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
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, ...
-
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 *)
-
T(n, k) = sum(j=1, n, j^k*binomial(n\j+1, 2));
-
T(n, k) = sum(j=1, n, j*sigma(j, k-1));
-
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
Showing 1-10 of 17 results.
Comments