OFFSET
0,3
EXAMPLE
a(4) is computed as follows: a(3) + 1 = 6 = 110_2; the partial sums of digits and their weights are (0,1), (0+1,2), and (0+1+1,4), so the sum of partial sums is 0*1 + 1*2 + 2*4 = 10.
MATHEMATICA
PartialSums = Function[Accumulate[Reverse[IntegerDigits[#, 2]]]]
NestList[Total[# Power[2, Range[0, Length[#] - 1]]] &[PartialSums[1 + #]] &, 0, 20]
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Emanuel Landeholm, Jul 18 2017
STATUS
approved