110 people attended OEIS-50 (videos, suggestions); annual fundraising drive to start soon (donate); editors, please edit! (stack is over 300), your editing is more valuable than any donation.
A060973
a(2*n+1) = a(n+1)+a(n), a(2*n) = 2*a(n), with a(1)=0 and a(2)=1.
a(n) = n-A006165(n) = A006165(n)-A053646(n) = (n-A053646(n))/2 [for n>1 ]. If n = 2*2^m+k with 0< = k< = 2^m, then a(n) = 2^m; if n = 3*2^m+k with 0< = k< = 2^m, then a(n) = 2^m+k.
A060973 := proc(n) option remember; if n <= 2 then RETURN(n-1); fi; if n mod 2 = 0 then 2*A060973(n/2) else A060973((n-1)/2)+A060973((n+1)/2); fi; end;