OFFSET
0,3
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..9999
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) ~ n^3 * (log(n) + 2*gamma - 4/3)/3, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jun 15 2024
EXAMPLE
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.
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];
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, May 06 2005
STATUS
approved