login
A350163
a(n) = Sum_{k=1..n} (-1)^(k+1) * floor(n/(2*k-1))^3.
1
1, 8, 26, 63, 125, 209, 335, 504, 703, 981, 1311, 1671, 2141, 2681, 3269, 3990, 4808, 5643, 6669, 7847, 8963, 10343, 11861, 13349, 15212, 17170, 19078, 21310, 23748, 26172, 28962, 31939, 34759, 38133, 41769, 45190, 49188, 53400, 57396, 62246, 67168, 71704, 77122
OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} A101455(k/d) * (d^3 - (d - 1)^3).
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k-1)^3) * x^k/(1 + x^(2*k)).
MATHEMATICA
a[n_] := Sum[(-1)^(k + 1) * Floor[n/(2*k - 1)]^3, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Dec 18 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*(n\(2*k-1))^3);
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, kronecker(-4, k/d)*(d^3-(d-1)^3)));
(PARI) my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (k^3-(k-1)^3)*x^k/(1+x^(2*k)))/(1-x))
CROSSREFS
Column 3 of A350161.
Sequence in context: A213039 A211640 A002901 * A213769 A301647 A050471
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 18 2021
STATUS
approved