OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
Conjecture: a(n) ~ 19 * 2^n / 6. - Vaclav Kotesovec, Mar 04 2023
EXAMPLE
a(0) = 0 (empty sum).
a(1) = 1 = 1_2.
a(2) = 5 = 2 + 3 = 10_2 + 11_2.
a(3) = 16 = 4 + 5 + 7 = 100_2 + 101_2 + 111_2.
a(4) = 40 = 8 + 6 + 11 + 15 = 1000_2 + 110_2 + 1011_2 + 1111_2.
MAPLE
b:= proc(i, j) option remember; uses Bits: local c, l, k;
if j=1 then 2^i-1
else c, l:= 0, [Split(b(i, j-1))[], 0];
for k while l[k]<>1 or l[k+1]<>0 do c:=c+l[k] od;
Join([1$c, 0$k-c, 1, l[k+2..-1][]])
fi
end:
a:= n-> add(b(j, n-j+1), j=1..n):
seq(a(n), n=0..32);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Mar 01 2023
STATUS
approved