%I #39 Jun 23 2017 08:58:01
%S 0,1,3,2,8,6,7,5,4,22,19,20,15,14,21,16,18,13,11,17,12,10,9,64,60,61,
%T 52,51,62,53,55,41,39,54,40,38,37,63,56,57,43,42,59,47,50,36,33,48,34,
%U 29,28,58,44,49,35,30,46,32,27,25,45,31,26,24,23,196,191,192,178,177
%N Signature-permutation of a Catalan Automorphism: (inverse of) "Donaghey's map M", acting on the parenthesizations encoded by A014486.
%C This is inverse of A057505, which is a signature permutation of Catalan automorphism (bijection) known as "Donaghey's map M". See A057505 for more comments, links and references.
%H Antti Karttunen, <a href="/A057506/b057506.txt">Table of n, a(n) for n = 0..23713</a>
%H A. Karttunen (et al) at OEIS Wiki, <a href="https://oeis.org/wiki/Source_code_for_Catalan_ranking_and_unranking_functions#Implementation_in_Maple">Maple implementations of CatalanRankGlobal, CatalanSequences, car, cdr, binexp2pars and pars2binexp functions</a>
%H A. Karttunen at OEIS WIki, <a href="https://oeis.org/wiki/Source_code_for_Catalan_ranking_and_unranking_functions#Implementation_in_Scheme_for_S-expressions">Scheme implementations of CatalanRankSexp and CatalanUnrankSexp</a>
%H Indranil Ghosh, <a href="/A057506/a057506.txt">Python program for computing this sequence</a> (after the functions mentioned in the OEIS wiki)
%H <a href="/index/Per#IntegerPermutationCatAuto">Index entries for signature-permutations of Catalan automorphisms</a>
%F a(n) = A057163(A057164(n)).
%F a(n) = A057163(A057505(A057163(n))) = A057164(A057505(A057164(n))).
%p map(CatalanRankGlobal,map(DonagheysA057506,CatalanSequences(196))); # Where CatalanSequences(n) gives the terms A014486(0..n).
%p DonagheysA057506 := n -> pars2binexp(deepreverse(DonagheysA057505(deepreverse(binexp2pars(n)))));
%p DonagheysA057505 := h -> `if`((0 = nops(h)), h, [op(DonagheysA057505(car(h))), DonagheysA057505(cdr(h))]);
%p # The following corresponds to automorphism A057164:
%p deepreverse := proc(a) if 0 = nops(a) or list <> whattype(a) then (a) else [op(deepreverse(cdr(a))), deepreverse(a[1])]; fi; end;
%p # The rest of required Maple-functions: see the given OEIS Wiki page.
%o (Scheme)
%o (define (A057506 n) (CatalanRankSexp (*A057506 (CatalanUnrankSexp n))))
%o (define (*A057506 bt) (let loop ((lt bt) (nt (list))) (cond ((not (pair? lt)) nt) (else (loop (cdr lt) (cons nt (*A057506 (car lt))))))))
%o ;; Functions CatalanRankSexp and CatalanUnrankSexp can be found at OEIS Wiki page.
%Y Inverse: A057505.
%Y Cf. A057161, A057162, A057163, A057164, A057501, A057502, A057503, A057504 (for similar signature permutations of simple Catalan automorphisms).
%Y Cf. A057507 (cycle counts).
%Y The 2nd, 3rd, 4th, 5th and 6th "powers" of this permutation: A071662, A071664, A071666, A071668, A071670.
%Y Row 12 of table A122287.
%Y Cf. also A014486, A080300, A080069, A080070.
%K nonn,look
%O 0,3
%A _Antti Karttunen_, Sep 03 2000
%E Entry revised by _Antti Karttunen_, May 30 2017
|