OFFSET
1,2
COMMENTS
Partial sums of A050457.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=1} (-1)^(k+1) * (2*k - 1) * x^(2*k-1)/(1 - x^(2*k-1)).
MAPLE
f:= proc(n) local r, d;
r:= n/2^padic:-ordp(n, 2);
add((-1)^((d-1)/2)*d, d = numtheory:-divisors(r))
end proc:
ListTools:-PartialSums(map(f, [$1..100])); # Robert Israel, Oct 28 2020
MATHEMATICA
Table[Sum[(-1)^(k + 1) (2 k - 1) Floor[n/(2 k - 1)], {k, 1, n}], {n, 1, 75}]
nmax = 75; CoefficientList[Series[1/(1 - x) Sum[(-1)^(k + 1) (2 k - 1) x^(2 k - 1)/(1 - x^(2 k - 1)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Jul 13 2019
STATUS
approved