OFFSET
0,1
COMMENTS
See the comment at A065658.
MAPLE
[seq(RotateBinFracLeftTable(j), j=0..119)]; RotateBinFracLeftTable := n -> RotateBinFracNodeLeft(1+(n-((trinv(n)*(trinv(n)-1))/2)), (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1);
RotateBinFracNodeLeft := (t, n) -> frac2position_in_0_1_SB_tree(RotateBinFracNodeLeft_x(t, SternBrocot0_1frac(n)));
RotateBinFracNodeLeft_x := proc(t, x) local num, den; den := 2^(1+floor_log_2(t)); num := (2*(t-(den/2)))+1; if((x <= (num-1)/den) or (x >= (num+1)/den)) then RETURN(x); fi; if(x >= ((2*num)+1)/(2*den)) then RETURN(((num-1)/den) + (2*(x - (num/den)))); fi; if(x > (num/den)) then RETURN(x - (1/(2*den))); fi; RETURN(((num-1)/den) + ((x-((num-1)/den))/2)); end;
SternBrocot0_1frac := proc(n) local m; m := n + 2^floor_log_2(n); SternBrocotTreeNum(m)/SternBrocotTreeDen(m); end;
frac2position_in_0_1_SB_tree := r -> RETURN(ReflectBinTreePermutation(cfrac2binexp(convert(1/r, confrac))));
CROSSREFS
The first row (rotate the top node left): A065661, 2nd row (rotate the top node's left child): A065663, 3rd row (rotate the top node's right child): A065665, 4th row: A065667, 5th row: A065669, 6th row: A065671, 7th row: A065673. Cf. also A065674-A065676. For the other needed Maple procedures follow A065658 which gives the inverse permutations.
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Nov 22 2001
STATUS
approved