login
Permutation of the positive integers: this permutation transforms the enumeration system of positive irreducible fractions A245327/A245328 into the enumeration system A002487/A002487' (Calkin-Wilf), and A020651/A020650 (Yu-Ting inverted) into A162911/A162912(Drib).
4

%I #10 Apr 10 2017 12:32:10

%S 1,2,3,6,5,4,7,14,13,8,11,10,9,12,15,30,29,24,27,18,17,20,23,22,21,16,

%T 19,26,25,28,31,62,61,56,59,50,49,52,55,38,37,32,35,42,41,44,47,46,45,

%U 40,43,34,33,36,39,54,53,48,51,58,57,60,63

%N Permutation of the positive integers: this permutation transforms the enumeration system of positive irreducible fractions A245327/A245328 into the enumeration system A002487/A002487' (Calkin-Wilf), and A020651/A020650 (Yu-Ting inverted) into A162911/A162912(Drib).

%C The inverse permutation is A284459.

%H Yosu Yurramendi, <a href="/A284460/b284460.txt">Table of n, a(n) for n = 1..16383</a>

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

%F a(n) = A231550(A258996(n)) = A092569(A231550(n)), n > 0 . - _Yosu Yurramendi_, Apr 10 2017

%o (R)

%o maxrow <- 4 # by choice

%o a <- 1

%o b01 <- 1

%o for(m in 0:maxrow){

%o b01 <- c(b01,rep(1,2^(m+1))); b01[(2^(m+1)+2^m-2^(m-1)):(2^(m+1)+2^m+2^(m-1)-1)] <- 0

%o for(k in 0:(2^m-1)){

%o a[2^(m+1) + k] <- a[2^m + k] + 2^(m + b01[2^(m+1) + k])

%o a[2^(m+1) + 2^m + k] <- a[2^m + k] + 2^(m + b01[2^(m+1) + 2^m + k])

%o }}

%o a

%o # _Yosu Yurramendi_, Mar 28 2017

%Y Cf. A002487, A020650, A020651, A162911, A162912, A245327, A245328, A284459.

%K nonn

%O 1,2

%A _Yosu Yurramendi_, Mar 28 2017