login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Order-preserving permutation of the rational numbers (x -> x-1); positions in Stern-Brocot tree.
9

%I #6 May 01 2014 02:48:24

%S 2,4,1,8,9,5,3,16,17,18,19,10,11,6,7,32,33,34,35,36,37,38,39,20,21,22,

%T 23,12,13,14,15,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,40,41,

%U 42,43,44,45,46,47,24,25,26,27,28,29,30,31,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150

%N Order-preserving permutation of the rational numbers (x -> x-1); positions in Stern-Brocot tree.

%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(n) = frac2position_in_whole_SB_tree(sbtree_perm_1_1_left(SternBrocotTreeNum(n)/SternBrocotTreeDen(n)))

%p sbtree_perm_1_1_left := x -> (`if`((x <= 0),x,(`if`((x < 1),(x/(1+x)),(`if`((x < 2),(1/(3-x)),(x-1)))))));

%Y Inverse permutation: A057114.

%Y When conjugated with A059893, one gets A065260, a valid siteswap permutation.

%Y The first row of A065626, i.e. a(n) = RotateNodeLeft(1, n).

%K nonn

%O 1,1

%A _Antti Karttunen_, Aug 09 2000