OFFSET
1,2
COMMENTS
a(n) is also the sum of all parts of all partitions of all positive integers <= n into an odd number of equal parts. - Omar E. Pol, Jun 05 2017
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = Sum_{k=1..floor((n+1)/2)} (2*k-1)/2 * floor(n/(2*k-1)) * floor(1 + n/(2*k-1)). - Daniel Suteu, Nov 06 2018
EXAMPLE
For n = 15, there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. The sum of all parts of these four partitions is 60, and a(14) = 204, so a(15) = 204 + 60 = 264.
MATHEMATICA
a285900[n_] := Accumulate[Map[# DivisorSum[#, 1 &, OddQ] &, Range[n]]]
a285900[60] (* data *) (* Hartmut F. W. Hoft, Jun 06 2017 *)
PROG
(PARI) a(n)=sum(i=1, n, i * sumdiv(i, d, d%2)); \\ Andrew Howroyd, Nov 06 2018
(PARI) a(n)=sum(k=1, (n+1)\2, (2*k - 1)/2 * (n\(2*k - 1)) * (1 + n\(2*k - 1))); \\ Andrew Howroyd, Nov 06 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, May 02 2017
STATUS
approved