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”).

Inverse permutation to A072634.
6

%I #6 May 01 2014 02:43:28

%S 0,1,3,2,6,8,7,19,16,5,15,4,14,52,43,51,42,20,22,53,60,21,61,56,179,

%T 155,178,154,177,164,557,163,556,11,39,13,41,151,123,153,125,12,40,33,

%U 117,152,124,471,381,477,553,479,555,505,1797,507,1799,478,554,1536

%N Inverse permutation to A072634.

%H A. Karttunen, <a href="http://www.iki.fi/~kartturi/matikka/Nekomorphisms/gatomorf.htm">Gatomorphisms</a>

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

%o (Scheme functions below show the essential idea. For a complete source, follow the "Gatomorphisms" link.)

%o (define A072635 (arithrank->lexrank-bijection A059905 A059906))

%o (define (arithrank->lexrank-bijection pr1 pr2) (lambda (n) (CatalanRankGlobal (parenthesization->binexp (unrank-bintree n pr1 pr2)))))

%o (define (unrank-bintree rank pr1 pr2) (cond ((zero? rank) (list)) (else (cons (unrank-bintree (pr1 (-1+ rank)) pr1 pr2) (unrank-bintree (pr2 (-1+ rank)) pr1 pr2)))))

%o (define (A059905 n) (if (zero? n) n (+ (modulo n 2) (* 2 (A059905 (floor->exact (/ n 4)))))))

%o (define (A059906 n) (A059905 (floor->exact (/ n 2))))

%Y A072644 gives the size of the corresponding parenthesizations, i.e. A072644(n) = A029837(A014486(A072635(n))+1)/2 [A029837(n+1) gives the binary width of n].

%Y A072635(n) = A057163(A072637(n)). Cf. also A014486, A059905, A059906, A071652, A072647, A072637.

%K nonn

%O 0,3

%A _Antti Karttunen_, Jun 02 2002