login
Permutation of N induced by the order-preserving bijection QuQR2toQuQR1 on rationals.
3

%I #6 May 01 2014 02:49:32

%S 1,4,7,16,2,13,127,64,8,19,10,25,3,124,32767,256,32,67,34,9,79,40,5,

%T 49,6,223,112,247,31,4093,2147483647,1024,128,259,130,33,271,136,17,

%U 37,76,39,319,160,20,43,22,97,12,415,208,55,3583,1792,28,244,15,502,505,4090

%N Permutation of N induced by the order-preserving bijection QuQR2toQuQR1 on rationals.

%C This permutation converts the domain between the mappings N2QuQR1 and N2QuQR2 given in A065936 and A065937, i.e. N2QuQR2(j) = N2QuQR1(a[j])

%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>

%p [seq(QuQR2toQuQR1(j),j=1..128)];

%p QuQR2toQuQR1 := n -> frac2position_in_0_1_SB_tree(QtoQ0_1(SternBrocotTreeNum(n)/SternBrocotTreeDen(n)));

%p QtoQ0_1 := r -> (((2^floor(r))-1)+(frac(r)/2))/(2^floor(r));

%Y Inverse permutation: A065934. For other needed Maple procedures, follow A065658. Cf. also A065936-A065939.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 07 2001