%I #6 Oct 30 2017 03:47:50
%S 0,1,1,3,1,2,4,5,1,2,4,4,3,6,9,7,1,2,4,4,3,6,9,6,3,6,8,7,9,15,16,9,1,
%T 2,4,4,3,6,9,6,3,6,8,7,9,15,16,8,3,6,8,7,9,15,15,9,9,14,15,16,24,31,
%U 25,11,1,2,4,4,3,6,9,6,3,6,8,7,9,15,16,8,3,6,8,7,9,15,15,9,9,14,15,16,24,31,25
%N a(0)=0; a(1)=1; a(2)=1; for n>=3 if n=2^i + j with 0<=j<2^i then a(n)=a(j) + a(j + 1) except we add 1 if j=2^i-1.
%H Robert Israel, <a href="/A151845/b151845.txt">Table of n, a(n) for n = 0..10000</a>
%F I would very much like a g.f. for this sequence!
%p f:= proc(n) option remember; local i,j;
%p i:= ilog2(n);
%p j:= n - 2^i;
%p if j = 2^i-1 then procname(j)+procname(j+1)+1 else procname(j)+procname(j+1) fi
%p end proc:
%p f(0):= 0: f(1):=1: f(2):= 1:
%p map(f, [$0..100]); # _Robert Israel_, Oct 30 2017
%Y Cf. A151843-A151874.
%K nonn
%O 0,4
%A _N. J. A. Sloane_, Jul 17 2009
%E Name corrected by _Robert Israel_, Oct 30 2017