OFFSET
1,2
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=0} (k+1)^3 * x^(2^k) / (1 + x^(2^k)).
EXAMPLE
To get a(5), we write 10 = 2 + 8 = 2^1 + 2^3 so a(5) = 1^3 + 3^3 = 28.
MATHEMATICA
a[n_] := Total[Flatten[Position[Reverse[IntegerDigits[n, 2]], 1]]^3]; Table[a[n], {n, 1, 60}]
nmax = 60; CoefficientList[Series[(1/(1 - x)) Sum[(k + 1)^3 x^(2^k)/(1 + x^(2^k)), {k, 0, Log[2, nmax]}], {x, 0, nmax}], x] // Rest
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 24 2024
STATUS
approved