login
A106846
a(n) = Sum_{k + l*m <= n} (k + l*m), with 0 <= k,l,m <= n.
4
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,2
LINKS
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)
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 *)
KEYWORD
nonn
AUTHOR
Ralf Stephan, May 06 2005
STATUS
approved