OFFSET
1,1
COMMENTS
On the right side every node replaces its right child, on the left side the left children replace their parents and the right children are transferred to the same offset - 1 at the right side (becoming left children). See comment at A065263.
LINKS
MAPLE
RightChildTransferred_1 := proc(n) local k; if(1 = n) then RETURN(3); fi; k := floor_log_2(n)-1; if(3 = floor(n/(2^k))) then RETURN((2*n)+1); fi; if(0 = (n mod 2)) then RETURN(n/2); fi; RETURN(n + (2^k) - 1); end;
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 28 2001
STATUS
approved