OFFSET
1,2
LINKS
Sean A. Irvine, Java program (github)
EXAMPLE
The fraction 1/2 is at the root (position 1), 1/4 is the left child of its left child, in the position 4 (when the tree is traversed in left-to-right, breadth-first fashion), while 3/4 is the right child of the right child of the root (pos. 7), 1/8 is at the position 64 (6 steps down the left branch from the root) and 3/8 is the right child of the left child of the root, at the position 10, etc.
MAPLE
QuasiCyclics2_pos_in_0_1_SB_tree := proc(t) local num, den; den := 2^(1+floor_log_2(t)); num := (2*(t-(den/2)))+1; RETURN(frac2position_in_0_1_SB_tree(num/den)); end;
[seq(QuasiCyclics2_pos_in_0_1_SB_tree(j), j=1..128)]
# For missing Maple functions follow A065658.
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 22 2001
STATUS
approved