OFFSET
0,2
LINKS
R. J. Mathar, Table of n, a(n) for n = 0..1000
FORMULA
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];
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, May 06 2005
STATUS
approved