login
A151853
a(0)=0; a(1)=1; a(2)=2; for n>=3 if n=2^i + j with 0<=j<2^i then a(n)=a(j) + 2*a(j + 1) except we add 1 if j=2^i-1.
2
0, 1, 2, 6, 2, 5, 14, 11, 2, 5, 14, 10, 12, 33, 36, 16, 2, 5, 14, 10, 12, 33, 36, 15, 12, 33, 34, 34, 78, 105, 68, 21, 2, 5, 14, 10, 12, 33, 36, 15, 12, 33, 34, 34, 78, 105, 68, 20, 12, 33, 34, 34, 78, 105, 66, 39, 78, 101, 102, 190, 288, 241, 110, 26, 2, 5, 14, 10, 12, 33, 36, 15, 12
OFFSET
0,3
LINKS
FORMULA
I would very much like a g.f. for this sequence!
MAPLE
f:= proc(n) option remember; local i, j;
i:= ilog2(n);
j:= n-2^i;
if j = 2^i-1 then procname(j)+2*procname(j+1)+1
else procname(j) + 2*procname(j+1)
fi
end proc:
f(0):= 0: f(1):= 1: f(2):= 2:
map(f, [$0..100]); # Robert Israel, May 18 2020
CROSSREFS
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Jul 17 2009
EXTENSIONS
Typo in name corrected by Robert Israel, May 18 2020
STATUS
approved